Before we can get into the different types of guns and how they work, we need a list of common terms.
A fully loaded Cartridge consists of four things. The Bullet is the part that flies out of the front and does the damage. The Powder is what burns to make that happen. The Primer starts the powder burning, and the Shell or Casing holds it all together.
Shell casings come in two basic types and two basic configurations. Handguns tend to use straight wall cases. This means they are about the same diameter at the top as they are at the bottom. Rifles tend to use a bottle shape where the neck of the case is just big enough to hold the bullet, while the bottom of the case is much larger. This allows them to hold more powder, and increases the power of the round.
The other two differences relate to the Rim of the case. The rim can either stick out slightly, like a small, stubby L, or it can be recessed in so the diameter of the rim is the same as the diameter of the case. This is the best indicator of whether or not the case was intended for use in a vertically stacked magazine, as used in most modern semi automatic actions for both rifles and pistols. Recessed rims are called Rimless cases.
Collectively, all of this is called a cartridge, or Round. It is also sometimes called a bullet, though that is technically the name for just the bit that flies out. The Bullet can also be called a Slug, though that is an outdated term unless dealing with a shotgun that fires a single projectile.