The term "whipping" derives from hunting (ie. whipping in the hounds) and it's the system of political party discipline within parliament (or other assembly).
If an MP "takes the whip" it means he agrees to follow the party's wishes in parliament. This is the default position.
The "three line" bit comes from the underlining on the MPs order paper that lists the votes that will take place in the chamber.
If the party doesn't take a particular position on an issue, it's called a "free vote", so there is no whip.
If a party would prefer you to vote in the way the party wants, it underlines the vote notice once - a "one-line whip".
If a party is very keen for you to turn up and vote, it underlines twice. You'll be in a fair bit of trouble if you don't turn up and vote or arrange a "pair".
If a vote is essential to the party's programme, then you are required to turn up and vote. The vote will be underlined three times. If you miss the vote, abstain or vote against the party you'll be in big, big trouble. You certainly won't get promoted and if you make a habit of this kind of thing, you'll "have the whip withdrawn", ie. you're effectively kicked out of the party within parliament.
Alternatively, you can "resign the whip" but you can forget about being reselected by the party to stand for parliament in the next election.