The prior poster deviated from the mark a bit, so I will try to clarify.
A "preliminary" year is a one year internship, generally in medicine or surgery. It can be your PGY-1 year for an advanced program, or it may be a stand alone residency (often with the hopes of converting it into a longerm categorical path, or for someone who didn't get anything else and hopes to enter the match in a subsequent year with a year of residency under his/her belt).
Some residencies are "advanced", meaning they want you to show up having already had an intern year someplace, usually in medicine or surgery. The advanced programs include the ROAD specialties, plus PM&R, rad onc, neurology, nuclear medicine, and probably a few others I'm forgetting. These advanced programs start in year PGY-2. So you need to line something up first (also done in the same match), which in most cases may be either a preliminary year or a transitional year.
A "categorical" program is one which starts in PGY-1 and continues on -- no separate intern year is required, it's all built in. So if you are a categorical IM resident, you are going to be at the same place for 3 years, and the intern year is built in.
Transitional year is NOTHING LIKE a fifth year of med school. You work as an intern (a PGY-1 resident). The only difference is that instead of spending it doing a year of a single discipline (eg medicine or surgery), you rotate through multiple disciplines -- psych, peds, IM, etc. Which is why some people might say it's analagous to med school. But the duties and responsibilities and hours won't generally be the same as your typical med school rotation. These years were originally created for folks who hadn't yet decided what path they wanted to take once they graduated from med school. However since transitional programs are generally regarded as "cushier" than the typical internship year, and because they satisfy the PGY-1 requirement of most of the advanced programs, these transitional year programs tend to fill up with people already bound for the more competitive ROAD specialties. Meaning the person with top Step scores who is bound for derm is going to keep you out of that cushy transitional year program. Which is why these programs, which no longer serve their intended purpose, should probably be replaced by more traditional, prelim year programs.
However you do it, your PGY-1 year is your "internship" year, whether it be a prelim year, a transitional year, or your first year of your categorical program. This will often be the hardest year because the learning curve is so steep, and because you are at the bottom of the totem pole -- everybody's whipping boy. In some of the prelim and categorical PGY-1 years, you will regularly flirt with the 80 hour averaged duty hour limits. Transitional years less so (although "cushier" may mean 65 hours compared with 80), but those few "lifestyle friendly" internship spots are often snagged by the derm dudes with 260s. Plan to work hard in residency, in whatever form you do it.
Hope that clarifies a bit. In short: once you pick a specialty, you either pick a categorical or advanced specialty. If it's categorical, you enter in year one and nothing else to consider. If it's advanced, that means it starts in year two and you also have to line up a year one gig, which may be prelim or transitional. If it's prelim, it can usually be a year of medicine or surgery. For most advanced fields it won't matter (neurology requires it to be medicine), but the surgery prelim year is frequently going to be the harder of the two. If you are uber smart/credentialed and want something cushier, you can perhaps snag a transitional year.
As for why they are in different locations -- it's simply that they are independent from the advanced residencies, and many places with advanced residencies don't have enough prelims as compared to advanced slots, while others may not offer transitional programs, and while still others are simply not known to be nice places to do your prelim year. So you can mix and match. You can stay on in the region you did med school for an extra year. You can go off and do that transitional year in Cali for a year and then come back to your hometown for the advanced program. You can use that prelim surgery year in North Dakota as your fall back if your categorical path doesn't pan out. etc.
When you apply for the match, if you are applying for advanced programs, you also have to create a sub-rank of prelim or transitional programs to go along with them. Meaning you match into the entire prelim-advanced combo in the same match. Meaning you generally have to interview for both sets of options. That can be a lot of interviews, but if you are qualified for the advanced, you can usually get away with a lesser number of prelims (which are less competitive). But not always -- the gen res board each year is littered with folks who matched advanced but had to scramble for prelims. That malignant prelim surg in Nebraska will still be there, but if you can interview for and line up some benign transitional year in a part of the country you like, it's usually worth it.
You have to realize that a lot of this is relics from back in the day when all physicians were expected to be generalists first, before they could specialize. Meaning the dude going into anesthesia still had to be able to handle the typical IM issues, and the dude going into radiology still ought to have exposure in running codes, etc. So at one time everybody had to do a year of IM or surgery residency first, before subspecializing. Then programs started branching out, creating their own categorical paths where they included whatever they felt necessary for their interns. The ROAD and advanced fields opted to use the existing internship year framework -- allow folks to get that generalist year in first before starting as a "first year specialty resident" in PGY-2. Then transitional years cropped up as a response to people saying they didn't have enough time in med school to figure out what they wanted to do before the match. And once the advanced programs indicated they accepted these as the PGY-1 year, these paths, deemed easier, got bastardized and snagged by folks who already knew what they wanted to do but had better stats, effectively defeating the whole point of these programs. But since funding for these programs kept coming, programs kept offering these. There is some buzz about adding more requirements to these and making them less cushy, to perhaps steal them back to their original purpose, but that is still in the works.
Sorry for the ramble. I can clarify things if you ask specific questions where I perhaps got confusing.