OP.
I agree it can be confusing. It confused me also early on in med school when I found out about it. It would be kind of nice if we all did an internship before having to figure out what we want to do forever (career-wise). It's not really that way in this country though, unfortunately (IMHO).
As mentioned above, some fields require a transitional or prelim year (kind of like a warmup where you gain general medical knowledge). These are basically some of the specialty fields (anesthesiology, neurology, etc.). They want you to have some basic knowledge of practicing medicine in a hospital setting before they teach you the specifics of your specialty. Because of they way hospitals have set up the residency system, you pretty much have to appy for the first year (PGY1) and the 2nd year (PGY2) in these type programs at the same time. So basically you'd be applying for something like an internal medicine PGY1 ("medicine prelim year") and a bunch of neurology PGY2 programs (neurology residency) all at the same time during your 4th year of med school.
There are basically 3 types of these "warmup" type PGY 1 years.
-"medicine prelim year" (intern year run by internal medicine department of a hospital). Used for neurology, sometimes anesthesiology and radiology, sometimes opthalmology, and some other fields.
-"transitional year" (usually includes rotations through a variety of fields, not just internal medicine, and tends to be cushier and have less call [though not always], tends to be harder/more competitive to get than IM prelim year). Can be used for radiology, opthalmology, a few other fields (but not for neurology and surgical fields).
-"surgical prelim year" (intern year run by a hospital's surgical department). Can be used to get ready for a PGY 2 year in anesthesiology, opthalmology, radiology, and sometimes as a back door way to try to get into things like ENT, urology, general surgery categorical residency, other surgical residencies if the med student didn't originally match into one of those fields but wanted to. Surgical prelim years tend to be the worst hours and hardest work (though some IM years have up to 11 months of Q3 and Q4 call, the daily hours don't tend to be as long as with surgical prelim years).