I wish people would stop mindlessly posing links to mechbox.com, has anyone even been there lately? It's pretty useless now.
1- Trigger is pulled which spins your motor
2- Motor turns spinning a series of three gears in this order: bevel gear, spur gear then the sector gear
3- The sector gear turning does two things: 1- Pulls the piston back compressing the spring. 2- pulls the tappet plate back allowing a bb to be chambered.
4- When the teeth on the sector gear end the piston is released and the spring pushes the piston forward.
5- The piston pushes air through the cylinder, cylinder head and the nozzle propelling your bb towards it's target, which is hopefully not me.
There's some other stuff going on in there but that's the gist of it.
Here are some animations to go along with the explanation
version 2 gearbox animation - YouTube
How a gearbox working 3D version - YouTube