Google:
The identifying feature of centerfire ammunition is the primer which is a metal cup containing a primary explosive inserted into a recess in the center of the base of the cartridge. The firearm firing pin crushes this explosive between the cup and an anvil to produce hot gas and a shower of incandescent particles to ignite the powder charge.[7] Berdan and Boxer cartridge primers are both considered "centerfire" and are not interchangeable at the primer level; however, the same weapon can fire either Berdan- or Boxer-primed cartridges if the overall dimensions are the same.[8]
The two primer types are almost impossible to distinguish by looking at the loaded cartridge, though the two flash-holes can be seen inside a fired Berdan case and the larger single hole seen or felt inside a fired Boxer case. Berdan priming is less expensive to manufacture and is much more common in military-surplus ammunition made outside the United States.
Berdan primer
Berdan primers are named after their American inventor, Hiram Berdan of New York who invented his first variation of the Berdan primer and patented it on March 20, 1866, in U.S. Patent 53,388. A small copper cylinder formed the shell of the cartridge, and the primer cap was pressed into a recess in the outside of the closed end of the cartridge opposite the bullet. In the end of the cartridge beneath the primer cap was a small vent-hole, as well as a small teat-like projection or point (later to be known as an anvil) fashioned from the case, such that the firing pin could crush the primer against the anvil and ignite the propellant. This system worked well, allowing the option of installing a cap just before use of the propellant-loaded cartridge as well as permitting reloading the cartridge for reuse.
Difficulties arose in practice because pressing in the cap from the outside tended to cause a swelling of the copper cartridge shell, preventing reliable seating of the cartridge in the chamber of the firearm. Berdan's solution was to change to brass shells, and to further modify the process of installing the primer cap into the cartridge, as noted in his second Berdan Primer patent of September 29, 1868, in U.S. Patent 82,587. Berdan primers have remained essentially the same functionally to the present day.
Berdan primers are similar to the caps used in the caplock system, being small metal cups with pressure-sensitive explosive in them. Modern Berdan primers are pressed into the "primer pocket" of a Berdan-type cartridge case, where they fit slightly below flush with the base of the case. Inside the primer pocket is a small bump, the "anvil", that rests against the center of the cup, and two small holes (one on either side of the anvil) that allow flash from the primer to reach the interior of the case. Berdan cases are reusable, although the process is rather involved. The used primer must be removed, usually by hydraulic pressure or a pincer or lever that pulls the primer out of the bottom. A new primer is carefully seated against the anvil, and then powder and a bullet are added.
Boxer primer
Meanwhile, Colonel Edward Mounier Boxer, of the Royal Arsenal, Woolwich, England was working on a primer cap design for cartridges, patenting it in England on October 13, 1866, and subsequently received a U.S. patent for his design on June 29, 1869, in U.S. Patent 91,818.
Boxer primers are similar to Berdan primers with one major difference: the location of the anvil. In a Boxer primer, the anvil is a separate stirrup piece that sits inverted in the primer cup providing sufficient resistance to the impact of the firing pin as it indents the cup and crushes the pressure-sensitive ignition compound. The primer pocket in the case head has a single flash-hole in its center. This positioning makes little or no difference to the performance of the round, but it makes fired primers vastly easier to remove for re-loading, as a single, centered rod pushed through the flash hole from the open end of the case will eject the two-piece primer from the primer cup. A new primer, anvil included, is then pressed into the case using a reloading press or hand-tool. Boxer priming is universal for US-manufactured civilian factory ammunition.
Boxer-primed ammunition is slightly more complex to manufacture, since the primer is in two parts in addition to the pressure-sensitive compound, but automated machinery producing primers by the hundreds of millions has eliminated that as a practical problem. And while the primer is one step more complex to make, the cartridge case is simpler to make, use, and reload.