Gun oil is used to clean and protect weaponry from the corrosive and rusting effects of moisture, dirt and salt from sweat coming into contact with the gun metal. It also lubricates and protects the moving parts of the gun.
Gun oil is a specially formulated type of penetrating oil and contains additives designed for use with rifles and pistols. According to United States Patent 7432231, basic gun oil is composed essentially of the ingredients isopropanol, petroleum distillate or heptane, viscosity modifiers, antioxidants and reducing agents.
Machine oil is designed to protect the metal surfaces and lubricate the moving parts of sewing machines and sergers. It is a mix of various petrochemicals extracted from petroleum oil. Sometimes machine oil is made from alternative natural substitute chemicals, such as low viscosity hydro-treated paraffinic oil.
Ordinary light machine oil is used by many gun owners on the metal and wooden parts of manual action guns with no noticeable difference in protection and lubrication. Compared to specially packaged and advertised gun oil, it's often much cheaper. Gun oil with Teflon additives are preferred with gas-operated rifles, automatic and semiautomatic guns.