Air guns are not airsoft guns, as they function quite differently and are much more powerful. They are classified as pneumatic (that means using gas to do work in science .458 socom ammo and technology, thank you Wikipedia) guns, and they have many different operational styles.
One must know that air guns are not new, in fact, they go back as far as the 1400s. They were favorable to alternative types of firearms because of their speed (back then it was fast), quietness, and low visibility. Air guns could be fired more times than other times of guns and did not make very loud sounds or put out clouds of smoke. They are also very powerful, and that is what is covered next.
Three main methods are available for powering air guns; spring-piston, gas-ram, and pneumatic. Spring piston air guns are pumped by cocking the barrel or a level. The strength required to cock is directly proportional to the power of the air gun. Typically, spring pistons shoot pellets at the speed of sound. They operate through an internal spring-loaded piston, which is pulled back and locked into a sear. After pulling the trigger, the piston is released and compresses air heavily in a chamber directly behind the pellet, and that pressure pushes the pellet out through the barrel. Many modern spring piston guns have a battery to automatically cock the gun, and although many are single-shot and are loaded through a breech (like a shotgun), advancements have allowed multi-shot spring piston guns.
Gas-ram air guns are quite interesting, in the fact that their spring is gas itself. There is a small amount of gas in a chamber behind the pellet, and after cocking, that air becomes much more pressurized. Gas-rams are much more efficient and overall better than spring pistons because of their durability and advanced accuracy, although they do cost more.
Finally, there is pneumatic, which is separated into several different categories. First of all, pneumatic guns use only gas to project the pellets; you pump, gas is compressed, pull the trigger, gas pushes the pellet out. This sounds a lot like gas-ram but, although it is similar, it is not the same. In gas-ram there is already some gas inside the chamber, and that gas is further compressed, but in pneumatic, each pump there is fresh gas. There are two types of regular pneumatic guns; multi-stroke and single-stroke. In multi-stroke guns, the pump must be pulled over one time for a sufficient shot, while single-stroke guns only require one pump. Multi-stroke pneumatic air guns are the most popular and cheapest kind of air gun.