PRS can be categorical (done as a residency) or done as a 2 year fellowship after 5 years of gen surg residency.
Ophtho is three years after doing a general preliminary year first. Others like this include neuro, Derm, radiology, rad onc. Not sure if PMR is categorical or not.
Some surg programs throw in an extra research year which may explain that.
PMR is very rarely categorical.
To the OP:
All specialties require 1 year as an intern (either surgical or internal medicine) except pathology.
Fellowships after internal medicine are:
Endocrinology, Rheumatology, Allergy, Cardiology (then additional fellowships for interventional cardiology or electrophysiology), Pulmonology/critical care medicine, hematology/oncology, nephrology, Infectious disease, geriatrics, and Gastroenterology.
Alot of fellowships are open to multiple specialties (pain management, palliative care, sports medicine, etc)
Neurology, anesthesiology, PM&R, ophtho, Dermatology, radiology, and radiation oncology require a separate intern year to be completed before starting.
Generally speaking ob/gyn, family medicine, emergency med, psychiatry have intern years included but the intern year is more focused on their specialty. Also pediatrics is isolated to kids starting day one of intern/resident year.
Surgery is similar in that you must always complete 1 year of general surgery whether you are going into ortho, urology, neurosurgery (although theirs is sometimes more neuro focused from day one), ENT, plastics, etc. As people mentioned some surgical specialties (vascular, plastics, cardiothoracic) are fellowships after completing a 5 year general surgery residency. However, now residencies also exist to train these specialist surgeons.
It's confusing, but you will learn from exposure and mentors in med school.