These are two terms that shooters sometimes hear thrown around, but it is one that can be confusing. So let's take the mystery out of them.
Both rimfire and centerfire refer to the way that a cartridge is activated. Each cartridge contains a primer that creates an explosion when it is activated. This explosion is what allows the bullet to be forced out of the casing of the cartridge and down the barrel of the handgun.
Rimfire cartridges contain the primer in the rim of the casing. This means that in order to be fired, the striking mechanism within the firearm must quickly pinch against the rim. This action creates the explosion that causes the bullet to discharge.
Centerfire cartridges have their primer located centrally. The primer is directly behind the "center cap" of the casing. This requires that the striking mechanism deliver a concentrated action into the middle part of the back of the cartridge.
Almost all modern rounds are centerfire. The only common round that is a rimfire is the .22 caliber. For this reason, rimfire and .22 have virtually become synonymous terms in the shooting world.
A unique problem can occur in rimfire ammunition due to how it is made. During shipping and/or storage, the primer can sometimes settle in the rim. For instance, if the box is left on its side on the store shelf for a length of time, the primer can all settle to one side or the other. This means that when you press the trigger, the firing mechanism strikes an area without any primer.
When this happens, you simply get a "click". It is not uncommon to see something like this happen. Usually the ammunition is fine. After ejecting the cartridge, you can see a clear marking on the rim where it was struck. When the round is reinserted into the firearm, it will typically work on the second try. The striking mechanism usually strikes a different area of the rim with success.
So the terms rimfire and centerfire are very literally discussing the area of the cartridge that causes the bullet to fire from the casing. The ammunition that your firearm is chambered for will determine which type you use.