Step 1: Fill out ERAS, which is similar in some respects to the AMCAS used for medical school admissions, but less arduous.
Step 2: Wait for schools to interview you.
Step 3: Go on interviews.
Step 4: "Rank" programs that you interviewed at. The programs will do the same for the applicants they interviewed.
Step 5: You match. You are given an offer to attend the institution which you ranked the highest but which also ranked you high enough "to match." In other words, if your #1 program has 6 residency slots, you must be ranked within the top 6 on their list in order to match there. The alternative is that the people that they rank within the top 6 match elsewhere because they ranked other programs more highly. Unlike medical admissions, you are NOT provided a choice on which program to attend. Your only choice in the matter is your program rankings.
Step 6: If you fail to match, you then do the "scramble," which is a process by which you get a spot at a program that did not fill up with matched residents. This is typically not a good thing as desireable/high-quality programs will not have this problem as a general rule.
The NRMP explains this all pretty well. Google it. Despite this, even medical students seem to completely lack understanding of how the match works.