The holding power on the exterior nail with the head, once you pound it in, gives the pieces of wood a lot of holding power and it allows them to stay together.
If you're doing exterior trim work and you don't want to see the head of the nail, you use a casing nail, which has a smooth shaft and a tapered head. You can drive it below the surface with your hammer.
And if you want to take the nail even further below the surface, pick up one of these. It's called a nail set. It's a special hardened steel with a pointed tip that will fit right on top of the finishing nail. You hold it there and drive it below the surface. Then you can come back and fill in this pocket with putty.
For fine cabinet work and interior trim, you want to use a bright finishing nail. You can drive it down to the surface, and then finish it off with your nail set. That way you don't leave a hammer mark on your fine cabinet work.
Nails are usually sold by the pound. You'll see a "d" on the front of the box. That's an indication of the thickness and the length of the nail. For instance, a 2d nail is thin and short. A 12d is long and fat. You want to make sure that you get a nail that's the right size for the wood. If the nail is too big for the wood, it's going to split. A smaller nail will get you away from that problem.