Some flight crews are armed. Other airlines (El Al, Sudan, a surprisingly high number of others) carry armed sky marshalls. The bullets are actually like (unfamiliar Americanism coming up) a Hacky Sack, if I'm right in thinking that a Hacky Sack is a small bag of pellets or seeds. It's rolled up inside the chamber of the gun, and when it's fired it initially retains it's balled-up shape, and will make a big hole in the first thing it hits, ie a human. As it continues to travel it opens up like a pancake and slows down incredibly fast, and if it missed the target and hit someone four rows behind, it definitely wouldn't kill them, probably not penetrate (you'd have a bit of a bruise though). It wouldn't go through the skin of a plane, maybe a window at point blank range. Unarmed flight crews are usually given a baton or similar, and all carry handcuffs.
fly Saha Air 707s daily from Tehran's downtown Mehrabad to Mashhad, Kish Island and Ahwaz