Ever since Eli Whitney invented interchangeable rifle parts, there’s been a great deal of uniformity imposed on firearms manufacturing. The same is true for the manufacturing of ammunition, since it has to be up to the standards or the guns it will be used in. Once ammunition was mass produced along with firearms, cartridges became uniform as well. There’s the bullet, which is the actual projectile, the main gunpowder charge, the casing (usually made of brass, hence the slang term for expended shells), and the primer charge. When a gun is fired, the hammer slams down on the primary charge, which ignites the gunpowder, firing the bullet.
Rimfire cartridges are one type of cartridge that aren’t used as often as center-fire cartridges. Rimfire cartridges have the primary charge inside the rim of the casing. As such, the hammer of a firearm that uses rimfire cartridges is usually round, so that it strikes the outside of the cartridge, which then ignites the gunpowder and fires the bullet. This is different from center-fire cartridges, where there is a separate primer kept in the base of the cartridge case and the rim is solid. Center-fire cartridges are more commonly used for larger loads of gunpowder that create more power, and as such, are often used in higher-caliber weapons.
Most problems with misfirings–when the hammer hits the cartridge but the primer doesn’t go off–occur as a result of problems with the weapon itself, not with the ammunition. Rimfire cartridges for instance are most popularly used in a .22 caliber meant for rifles. These same bullets can be used in .22 caliber handguns, but might cause problems, since there isn’t enough power for a semi-automatic handgun to function properly. Before using any variety of ammunition though, it’s best to talk with a gunsmith or gun dealer, as they’ll be able to offer advice on which ammunition may work best for given firearms. When in doubt, read your firearms manual.