See NRMP / The Match
THE MATCHING PROCESS
The process begins with an attempt to match an applicant to the program most preferred on that applicant’s rank order list. If the applicant cannot be matched to that first choice program, an attempt is made to place the applicant into the second choice program, and so on, until the applicant obtains a tentative match or all the applicant’s choices on the Rank Order List (ROL) have been exhausted.
...
When the Match is complete, all tentative matches become final. View an example of how the matching algorithm works.
MATCH RESOURCES
...