There are many different options for putting a protective or decorative coating on firearms. Some are essentially a controlled corrosion of the metal while other are actual coatings. In this video extract from the GCA GunTech Volume 75, Jack Landis shows you some interesting and educational information about Cerakote firearms coatings.
The second video I found on YouTube and is a great demonstration of the do-it-yourself aerosol cans of another product, DuraCoat. No special tools or skills needed to get a great long-lasting finish on all kinds of firearms, tools, etc.