Newer air pistols and varieties of BB
Air pistols come in a wide variety of designs, and not all of them are BB guns anymore. Some of the most popular air pistols today are of the airsoft variety, which shoot plastic pellets larger than the traditional metal rounds that are used in most BB guns. The same engineering idea goes into both kinds of weapon, though. A rush of released gas or a coiled spring pushes the projectile down the gun barrel and out.
Crosman 1377 American Classic
Air pistols can be powered by pumping action (pneumatic), a battery charge, a metal spring, or compressed CO2. Older BB guns were almost all of the pump style, which causes an increasing build up of air pressure with each pump. Squeezing the trigger released the air to push the pellet out of the barrel. The problem with this method was two-fold: that's a lot of pumping between shots, and the piston would wear out pretty quickly.
Newer air pistols - easier to use than older BB
As demand has risen for air pistols that are easier to use, the old pneumatic pump style has taken a back seat to CO2 and even single-cock electric-powered BB guns. While certainly more convenient for the shooter, both of these newer styles also present new problems.
Air pistols using CO2 cartridges are notorious for inconsistent power, which of course leads to less accuracy in your BB guns. This is especially true when it's cold outside, as the lower air temperature apparently interferes with the compression of the gas.
Gamo PT-80 Air Pistol
(with Laser Sight!)
Electric air pistols are the new kids on the block, and they are definitely the easiest to use. Several manufacturers even make semi-automatic BB guns (very cool!). However, this added realism and convenience comes with a higher price tag. Batteries need to be replaced fairly often, and the airgun's mechanisms are more intricate, making them expensive to replace when they wear out.