A firearm is a weapon that uses gunpowder to propel a bullet or projectile through a barrel. Firearms can be handheld, such as pistols and rifles, or mounted on vehicles, such as machine guns. They are used for hunting, self-defense, law enforcement, and military purposes.