How it's Made
The primer is a cup made of a fairly soft, malleable metal. Priming compound is placed into the open end of the cup, and a small separate metal piece known as the anvil is then inserted atop the priming compound. The firing pin crushes the compound between the cup and anvil, and that crushing force causes the compound to ignite.
Rimfire, too?
Primer may also refer to the priming compound in the rim of rimfire ammunition, which serves the same purpose as a centerfire primer (igniting the powder charge). This is in the minority, however, and in shooting texts primer most often refers to a centerfire primer as described above.

