You will find 4 main Nerf gun designs that are being used for the answer to how Nerf guns work.
It really is easy to make these semi-auto or auto using a motor to draw back and release the spring, but I haven’t seen this done except by companies like Nerf (eg. Stampede, Vulcan).
2. Air pressured
Air pressured, not used just as much anymore. Basically it really works just like a mini spud gun. You pump air to the pressure chamber, then pull the trigger/flip a ball valve/press the button on the solenoid to fire.
Flywheels, they are fairly new. There are two spinning flywheels on motors, and also you pull the trigger to push the dart in to the flywheel. It is then semi-auto.
By motorizing the trigger, it can be made fully automatic (eg. Rapidstrike).
Blowgun is definitely the easiest to build; take several feet of schedule 80 pvc pipe and you’re done. (Needless to say, there are lots of actions you can take to create your blowgun better.) Surprisingly, blowguns often have much better range and accuracy than stock nerf guns.
Flywheel is the hardest to be made
It is probably next easiest to build an air-pressured gun, but there are several drawbacks: safety (pvc pipe will not be entirely safe to get a pressure chamber despite the fact that people use it anyway), slow fire rate (you have to pump air way back in up to a certain psi), bulky (you want a long barrel for air guns), etc.
Next, is spring-loaded Nerf guns. You can search online for tutorials. The trigger may be sort of tricky. I suggest a SNAP or PumpSNAP (google for pictures); this is the very first Nerf gun I built, employing a tutorial online.
Flywheel has become the most challenging to build except if you have access to a bunch of tools, can solder, etc. For those who have a laser cutter and SolidWorks it can be ok; you design the gun in SolidWorks, laser cut everything, glue everything together, then carry out the wiring. (It takes a lot more than that sounds.)