You apply to residency in the fall (beginning) of your 4th year. In many ways the process is similar to applying to med school - you take a big test (USMLE instead of MCAT), you need three letters of recommendation, and depending on the residency program you're applying to, research is often helpful.
Your success at applying to residency is based primarily on (in rough order):
- USMLE Step 1 scores
- 3rd year grades
- letters of recommendation
- 1&2 year grades
- extracurriculars and personal statement
- name of your med school
And then of course you need to interview.
Unlike med school apps, you find out in March where you'll be spending your next 1/3/6 years....
Good luck!