A bullet is properly called a cartridge. A cartridge has a case that holds gunpowder, a primer that gets hit by a firing pin, ignites the gunpowder, and a bullet gets pushed out the barrel at high velocity by that pressure, and tries to keep going when it runs into things at high speed.
- We measure the diameter of a bullet as Caliber which is either 100ths or 1000ths of an inch (or millimeters / mm if you're in the rest of the world). So .30 caliber is 0.3 inches across (or 7.62 mm), and a .22 is 0.22 inches (5.56mm). People generally just shorten it to the number without the decimal point as in "22" or "30" caliber (or 762 and 556).
- The weight (mass) of the bullet is usually in grains (gr), or grams (g), based on its diameter (caliber) and the the length of the bullet. People usually don't talk about a bullet's length, or even weight: most often people are just talking about the standard cartridge, and they know the loose concept that some cartridges have bullets that weight more or less than others. So they know a .223 has a heavier bullet than a .22 LR, even if they're almost the same caliber. Rarely, gun-nerds or re-loaders (people that make their own ammo), will talk about different slight differences in weight for that cartridge.
- How much powder behind a bullet effects the velocity. Generally, more powder = more speed. But unless you're loading your own ammo, most people aren't really getting into how much powder is behind each cartridge. They just know that some cartridges have a lot more powder than others: again a .223 has more powder than a .22 LR, so even though they're almost the same diameter, the .223 has more powder, so throws a heavier (longer) bullet, faster, and hits with more energy.
- Length of barrel; again, when you get nerdy, you might care if you have an 18" or 22" long barrel. Most users just care if they're shooting the same round out of a pistol (say 6-12" barrel), or a rifle (say 18-24" barrel). Basically, the longer the barrel, the more time the gun powder has to push/accelerate the bullet, so longer is faster for the same round. But there is diminishing returns and some cross over point (where the friction in the barrel starts slowing the bullet more than the pressure helps). That's usually longer than most rifles, but there are a few exceptions.
A bullets momentum (potential damage) is based on all those things: the size and weight of the bullet, the amount of powder that pushes the bullet, and the length of the barrel (since the powder has more time in barrel to accelerate the bullet). Physics 101 : momentum = mass * velocity. So the more mass and velocity the bullet has, the more momentum or potential damage', measured in foot-lbs (ft⋅lbs) or joules (j), the bullet can deliver on the receiving side.
- The nail (because of the smaller cross section) will travel through the air better (lose less speed over time/distance), which means it is better for long range. It will also go deeper and will probably go right through you: a neat little hole -- and since it's still moving quickly when it exits you, it has failed to deliver all it's energy (damage) into your body (do the most damage). If it doesn't hit something vital, it'll hurt, but it won't kill you.
- The coin traveling the same speed will slow down in the air quicker (isn't as good for long range), and it will not penetrate as deeply when it hits you: but delivers all its energy over more flesh (and likely does more damage). Like slapping water, it also creates a shockwave (called hydrostatic shock) that can break vessels and rupture organs: even if the bullet doesn't get there, the shockwave does.
So what if you want a really fast .22 caliber bullet that's light, or a slow one that's heavy, or a really heavy one that's very fast and powerful? You can make all of those in .22 caliber, but how do you differentiate them? Since a thousandth of an inch (in Caliber) is too small to matter (even 100th of an inch doesn't usually matter), we use variants of those to be able to tell them apart.
So there's a lot of rounds that are .22 caliber. There's the .22 rimfire (in short, long rifle and magnum), and there's the .222 Remington and the .223 Remington, and so on. Physically, the bullet fit in the same barrel, but the cartridge behind the bullet are different sizes and shapes (and require different feeding/firing mechanisms, and the amount of pressure they create may change how thick the barrel needs to be, and so on). So you design guns to fit the bullets they fire. And we just use this extra detail on caliber (that doesn't matter), as a designators to abbreviate the cartridge they fire. e.g. I know a .223 is basically an overpowered derivation of the .222, and so on.
Up above we were talking about velocity and weight as delivering energy, but the other variable is about how well the bullets fly.
A gun is just a chemical slingshot: it throws little metal rocks at high speed (measured in fps / feet per second). But physics still applies.
Whether you drop a bullet, or shoot a bullet out of a gun, gravity pulls it down at the same rate of 9.8 m/s2 (9.8 meters for the first second, and accelerating that much more each second after that). Assume you want to hit something that's 1000 feet (333 yards) away and you have two different guns: one is a .22LR and the other is a .223. The .22 LR fires a bullet at ≈1000 fps (feet per second), and the latter at about 3,000 fps. To hit what you want with the .22 LR, you need to aim roughly 9.8 meters above it, while the .223 is about 3x as fast, and you only need to aim about 1/3rd that much (about 3.25 meters above it). That's ballistics.