The Whip (often refereed to Party Whip or Majority/Minority Whip) is typically the second most powerful person in their party's leadership in either house and are tasked with making sure everyone in the party "falls in line" and while no case of whipping out of line backbenchers has every historically been documented in so far as I am aware, the idea that the party whip will coerce his fellow party members into voting one way or another.
The term derrives from British Parliment, where the role is much more powerful than the U.S. Congressional equivalents. Because the most important parliment member is doing the job of both the President of the United States and The Speaker of the House in Britain, the Prime Minister doesn't have the time to call up the backbenchers and figure out what they need from him in order to vote the way he wants. It's not the same way in the U.S. so the Whip isn't as powerful, but the party Whip still has a kingmaker role. In the U.K. the whip could help get a back bencher onto a committee or into a cabinet position (Very big deal) while in the U.S., they can get them a committee or even a chair (both are very important in the U.S. Congress). Both sides can also threaten so promoted members with demotions to back bench if there is some dissent in the upper ranks.
Because of this, the Whip is pretty reliable to the leader of his house's party because he know who are going to vote yay, vote nay, are still considering, and most importantly how to best turn the nays and shrugs into yays. Which is important to the leader because he's the guy who actually names the comitee members and sets the expected vote and why (if he plays the reasons right, an undecided may side because the case for or against is not built on point he dislikes on principal. For an example of this works, watch the film Lincoln when Thaddeus Stevens, an ardent abolitionist, has to disavow the then politcally radical notion that blacks were not inferior to whites, in favor of a more face saving argument of "equal under the law" only, and when called on this, scores a blow against the notion and allows the more moderate Republicans some justification... by brutally insulting a Democrat Representative to his face and showing how he's still "equal under the law" (The real life Stevens actually did something similar but the film changed the speech a little... apperently the real Stevens' speech would had to be adjusted cause Spielberg wanted a PG-13 rating and not an R. And most sources available are thought to have further sanitized what Stevens actually said).
For a good look at how a Whip works, check out "Yes, Minister" episodes where party politics are heavily discussed. Typically, it involves Hacker and Humphrey trying to foil the Whip's attempts to push Hacker out of his office and not the Prime Minister (who wasn't seen on screen at all until Hacker became PM for the final two seasons.).