As stated by Mickey, the process varies from program to program.
Unfortunately I can assure you, from firsthand experience, that the ultimate decision is in the hands of the program director and/or chair of the department at SOME programs.
Who gets an interview is less of an issue, as most programs will give courtesy interviews to all rotators*. I don't think I've heard of a program where the residents have stopped someone from getting an interview.
As for ranking candidates...
100% of residents (and interns) in my program did not want a particular medical student at our home institution to match at "our" program. The overwhelming opinion was that he was such a suck-up, cocky, "yes man" type that he became exceedingly irritating to be around. Maybe he was just playing the game well or perhaps too well.
However he had "pretty good" board scores on steps I&II, research, publications and was overall a "very good" candidate in all OBJECTIVE categories. Subjectively however... he seemed lame.
Needless to say he matched (and we didn't go deep in our rank list)...undoubtedly because our program chair prides himself on being objective, which I cannot entirely disagree with.
Having a program full of people who are "cool/laid back" does nothing to benefit the residency program if they aren't performing well on OITE's and boards.
I'm sure the new incoming intern will do a good job, and as long as he handles his business, our subjective opinions won't matter.
-Hulk