BB guns use compressed gas to fire spherical pellets at a high velocity. In some cases, a manual pump is used to compress gas, and in others, compressed gas comes from a pre-filled compressed carbon dioxide container. Once the gun is loaded and pressurized, pulling the trigger releases the compressed gas behind the pellet, increasing the pressure inside the barrel and firing the projectile towards the target.
Since the amount of force generated by compressed gas is considerably less than the force generated by burning gunpowder, air rifles are much less likely than actual firearms to cause major injuries or death. BB guns can still cause damage by breaking the skin or striking particularly vulnerable parts of the body like the eyes, so care should still be taken to avoid injury. BB guns marketed toward younger users often use a weak spring-pressurizing system that results in a much lower muzzle velocity and a safer weapon.
The term BB comes from the fact that the earliest BB guns used ammunition that was nearly identical to the BB-gauge birdshot used in shotguns. Daisy originally marketed their ammunition as "round shot," but the public simply referred to it as BBs and the guns as BB guns, and eventually, the name stuck.