The purpose of a primer is to ignite the propellant powder in a given cartridge. To do this, the primer contains a very small amount of explosive held inside a metal primer cap. In technical terms, when the gun's firing pin strikes the primer cap, the priming mixture is crushed between the cap and the anvil. This causes the priming mixture to explode, sending a stream of hot gases through the flash hole and into the cartridge case. The stream of hot gas rapidly increases the temperature and pressure inside the cartridge case, igniting the propellant powder.
A primer cap is a stamping made from rolled copper-alloy sheet. The sheet is fed into a small stamping press where a multiple die set produces more than a dozen caps on each stroke. The caps are often nickel-plated. Primer caps are made in different diameters for different applications.
In manufacture, the primer caps are filled with primer mix using a method called "rubbing." This process begins with a thin steel plate containing several hundred holes. The plates are placed on shaker tables and primer caps broadcast over their surface. The shaking motion causes a cap to fall into each hole. Next, the plate is sent into the primer "rubbing room," a heavily built and spotlessly clean room where plates sit on a metal table and wet priming compound is hand-rubbed over the surface to fill each cap.
Why all the caution? Well, priming compound is a true high explosive. When wet, priming mix is insensitive and safe to handle. However, when it dries, it becomes very sensitive and is not safe to handle in bulk. Additionally, a primer inserted into a cartridge case while still wet is also more consistent than a primer inserted into a cartridge case when dry. A wet priming mixture will dry around the anvil tip, while a dry primer will not.
Prior to 1955, many primers, especially those used in military ammunition, were corrosive. This was because the chlorate priming mixtures contained salts that remained in the barrel after the gun was fired. Moisture in the air combined with the salts to cause corrosion in the bore. Corrosive primers worked very well and were used in many countries, such as Russia and China, up until recent times. U.S. military ammunition has been loaded exclusively with non-corrosive primers since 1955. Watch this carefully! Always note whether surplus ammunition is corrosive or not. Non-corrosive surplus ammunition commands a higher price. Beware of claims that surplus ammunition is "mildly corrosive." Primers are either corrosive, or they are not: There is no such thing as "mildly corrosive."
In general, military ammunition made before or during World War II should be considered corrosive. All NATO-specification 5.56x45mm ammunition is non-corrosive, as is all military .30 Carbine ammunition. Other calibers such as 7.62x51mm are generally non-corrosive, but there are exceptions. Virtually all sporting ammunition made in the US has used non-corrosive primers since after World War II.
While primers are filled with an explosive mix, each primer has only a very small amount in the cap. For example, a large rifle magnum primer or a 209 shotshell primer may contain only 36 milligrams of priming compound. Many small rifle and small pistol primers contain as little as 20 mg of priming mix.