My understanding is that you apply first year. We had 2 sessions where we were told all about the program. You may or may not be accepted. If not, you can reapply next year (for 2 years of funding instead of 3.) Then you complete school with some pretty typical and minimal time committments over the summer and with recruiting (explaining the program.) If you previously served, your previous service counts (I don't know all the details, could ask the hubby, he reviewed the option with me.) Note, grades apparently DO matter on this one, so do well (I don't know to what extent, but it IS competitive.)
Once you finish school, you have a commitment (I believe it is 4 years.) You do not get to start a residency until after you have completed some portion of your commitment (and apparently where you serve your committment has an impact, one of our residents only had to do 1 year before starting his residency, but my understanding was that he served in some less than ideal situations in afghanistan.) But, if they assist with your residency or you start it before your committment is out, you re-up(?) your committment for a couple more years. Apparently they do have some residencies that are army vet only.
Now, things to be aware of for those considering this without military experience. Do not do this if you are not ready and willing for military life. As my husband puts it 'married to the military' isn't for everyone. Do NOT do this if choosing where, how, and what work you do is a high priority for you. Do NOT do this if you are unwilling to do meat inspection, because it isn't an uncommon assignment. Don't presume you will get the dream job (I would sign up for a decade in a heart beat if someone would guarantee me the loaned to the navy position working with trained dolphins.) Do realize this will impact your SO/pets/etc.
There is a military doctor section on SDN. investigate it. Ask recruiters to put you in touch with a lot of vets that went through this process. well worth it. I learned a ton (and all I did was ask everyone that I knew if they knew a military vet.) Ask on VIN as well (which you can get an account as soon as you have your email set up.