People are on the right track but to help clear up the proper terms.
The previous "revolver" discussion was about right, but the word "pistol" is really just a word meaning any handgun.
My Dad and family were a hunting family so I picked up some knowledge along the way about them. Lets have a quick Gun101 class to help get the terms right for this and future cases. Some other terms can be used for some of these. This gives a basic breakdown using the common terms I am used to IMO.
First,
there are 2 basic types of guns.
Either "Long Guns" (rifles, shotguns, etc.) or
"Handguns" / "Pistols".
Secondly,
in the Handgun variety specifically, there are also primarily 2 basic types of handguns.
Either "Revolvers" or
"Semi-Automatics"
The "Semi-Automatic" handguns are the type that have the clip in the handle and eject an empty shell casing after each shot.
The "Revolver" is the type of handgun that has a cylinder that rotates around the barrel where 1 shell always lines up with the barrel. As you squeeze the trigger on a double-action revolver, it will rotate the cylinder to line up the next round with the barrel. After firing, the empty shell casings remain in the cylinder. After firing all rounds (usually 5 or 6 in a revolver), you usually pull a small leaver which opens the cylinder to the side to dump out the empty casings. Then reload the entire cylinder with new shells and you are ready to go again.
With a "Semi-Automatic" handgun like the Glock 9mm, the shells are loaded into a "magazine" usually called a "clip" which goes into the bottom of the handle and shoved upwards till it locks in place. Then after "racking the slide" (puts 1 shell in chamber), you can fire, and it ejects the empty shell casing out the side and "auto-loads" the next shell into the chamber for you so all you have to do is keep pulling the trigger and it will keep firing shells until your clip is empty.
Last but not least, we must understand the terms of the "round" or "shell" itself. A live round consists of a "bullet" on the end (usually lead or copper-jacketed lead tip bullets). The "bullet" is the projectile that comes out and does the damage.
Behind the bullet is usally some form of "wadding" material or plastic separator to keep the bullet positioned properly over the top of the gunpowder. The gunpowder is near the bottom of the shell.
On the very bottom there will be a "Primer". The "Primer" is usually a small circular explosive that the "hammer" of the gun falls onto and it explodes upon impact.
The small explosion of the "primer" sets off the main charge of the gunpowder which gives you the big boom and all the explosive gasses force the top lead bullet portion to fly out of the shell casing and head for its target.
The "Shell casing" is usually made of brass or copper for regular bullets, but it can be plastic like in shotgun shells. Shotgun shells can have a single lead slug as a projectile, but typically they will have small BB's inside a shotgun shell and they scatter when leaving the shotgun to cause a "spread of damage".
Shotguns are long guns like rifles and they can be either Semi-automatic variety where the empty shell casings fly out of the gun, or they can be manual type action like a pump-action or lever-action or bolt-action where the person has to manually load the next shell by working the action. In most all cases with shotguns or rifles (either semi-auto or pump-action, bolt-action, or lever-action), they will eject an empty shell casing when loading the next round.
Sorry that kind of got long. Hope this helps some.