First the search is opened. Several professors in a department are appointed to form the search committee, and the job is advertised on the department web site and other locations.
Then the applications come in– maybe 200 or so for one advertised position. Since faculty live busy lives, they do not actually read all these application packets in detail. Rather, they sort into three piles. The first pile is for clearly unqualified candidates– meaning those with too few papers, from unknown universities, or both. Then there is the second pile, of "promising" candidates. These come from top schools, have lots of publications, and (preferably) have recommendation letters from famous professors, some of whom (possibly) are former students or former advisors of the search committee members. "After all, you trust the people you know!" The third pile is for everyone else. They may be good; they may not be. Who knows? These applications get only a brief glance. Some universities will require (or encourage) the committee to go through that pile again, taking a second look at the women or minority candidates to see if they could be moved to the "promising" pile.
Five or so of the promising candidates are then invited to campus for interviews. Each candidate will give a departmental seminar and have scheduled half-hour meetings with up to 10 or 12 faculty. Often, one or two will totally screw up the interview by either alienating an important faculty member. Or they will appear to have no idea of what their research program will be if given the job. Certain faculty also regard Interviewing While Pregnant (IWP, let’s say) as screwing up. And certain faculty also think that any women or minorities on the interview list just got stuck there as token candidates due to the completely unfair practice of taking a second look at the applications and/or due to All That Pressure the Dean is Putting On Us These Days to Hire More Women.
Meanwhile, the Famous Recommendation Letter Writers from other universities are calling the search committee and/or department chair on the phone to advocate for their candidate, his/her brilliance, and the tremendous topical importance of his/her field (also the field of Famous Recommendation Letter Writer). The workings of Departmental Politics go forward, and at the end of the day, the search committee somehow ranks the candidates in order of preference. The top candidate is advanced to the full departmental faculty for an "up-or-down vote," as they say about Supreme Court nomination hearings.
Here, something interesting happens, for Number One is often the superstar of the year. S/he has seven papers in the last two years, four of which are in Nature or Science. S/he has degrees from Top Five institutions in the field, recommendations from super famous people, and appears to be brilliant. Most importantly, s/he is working on exactly the research field that EVERYONE WANTS, because it is new and hot and getting lots of funding. And so Number One also comes in on the top of the list at six other universities, and can have the pick of them all.
Number One can only take one job. But that doesn’t mean that Numbers Two through Six necessarily have a chance. Nope. A department is not obligated to hire anyone. And if they are not in a hurry, and if their Number Two choice pales in comparison to the brilliance of Number One (or Three to Two, etc. etc) they may just not fill the position this year at all. This has happened to several people I know– they landed interview slots at three or four universities, but didn’t end up with job offers from any of them.