"BB" in the term "BB gun" refers to the type of ammunition that kind of gun typically uses. A BB is a round projectile, in contrast to the more complex shapes of pellets. The original BB was .18 inches in diameter and made entirely of lead.
Modern BBs are often small, and they are made of a variety of materials. BB pellets designed for use with airsoft guns are made out of plastic and are about .17 inches in diameter. Modern BBs designed for more powerful air guns are made out of steel and have a thin coating of copper to prevent corrosion. Although most modern guns called BB guns do not use the traditionally sized lead shot, they continue to be called BB guns because that is what this class of gun was originally designed to shoot.