Before the 19th century, primer, powder and bullet existed as independent components. To shoot a musket, for example, someone had to pour a little powder into the firing pan, pour some more powder down the barrel and then ram a ball against the charge. Touching an external spark to the primer initiated the firing sequence. Paper cartridges made this a bit easier by providing the shooter a premeasured packet of powder, although he still needed to tear open the paper and dispense powder into both pan and barrel.
All of this changed in the late 1800s with the introduction of the bullet cartridge -- a self-contained unit that housed primer, propellant and projectile in a brass casing. Parisian gunmaker Louis Flobert had already produced cartridges in 1840, but they were small and reserved primarily for indoor target practice. Daniel Wesson (of Smith & Wesson fame) saw Flobert's experiment and, in the 1850s, invented the first brass cartridge ready for the battlefield and the backwoods. Wesson's design packed a small bit of mercury fulminate in the rim of the brass case. Black powder filled the hollow tube of the case, and a bullet sat on top.
The entire unit could be placed into the breech of the gun, eliminating the need for patches, percussion caps or other separate components. The cartridge itself formed the seal at the breech. When the weapon's hammer struck the rim of the cartridge, it ignited the primer, which then spread the flame through the black powder, forcing the bullet down the barrel.