The rules 
A batsman may be dismissed Run out whether or not a run is being attempted, even if the delivery is a no ball (i.e. not a fair delivery). There are a number of exceptions to this:
(1) A batsman is not run out if he or his bat had been grounded behind the popping crease, but he subsequently leaves it to avoid injury, when the wicket is put down.
(2) A batsman is not run out if the ball has not been touched by a fielder (excluding a helmet worn by a fielder), after the bowler has entered his delivery stride, before the wicket is put down. (Therefore, the bowler may not run out the striker instead of bowling to him. This also means that the non-striker is not out if a ball hit by the striker puts down the non-striker's wicket, provided the ball did not touch any member of the fielding side before doing so.)
(3) A batsman is not given out Run out if he can be given out Stumped (or, in the case of a No Ball, could have been so given out were the delivery a fair one).
The batsman can be judged run out when he is closest to the end where the wicket has been put down by the opposition and no other batsman is available inside the crease of the same end. The runs completed before a Run out are still scored by the batsman and his team (compare caught where the reverse is true). The bowler does not get credit for the wicket.
Running out a batsman "backing up" 
As a bowler enters his delivery stride, the non-striking batsman usually 'backs up'. This means he leaves his popping crease and walks towards the other end of the wicket so that it will take him less time to reach the other end if he and his batting partner choose to attempt a run.
Sometimes a batsman, whilst backing up, leaves the popping crease before the bowler has actually delivered the ball. Where this has happened, the bowler may attempt to run the non-striking batsman out. Getting a batsman out this way, though legal, is generally considered to be against the spirit of the game as the non-striker usually accidentally leaves the crease. By convention, the bowler is meant to warn the batsman to stay in his crease rather than to take his wicket. If he fails, and the batsman gets home, the delivery is called a dead ball. When it has happened in first-class cricket, it has been controversial.
Vinoo Mankad 
The most famous example of this method of dismissal involved the Indian bowler Vinoo Mankad. It occurred during India's tour of Australia on 13 December 1947 in the second Test at Sydney. Mankad ran out Bill Brown when, in the act of delivering the ball, he held on to it and removed the bails with Brown well out of his crease. This was the second time Mankad had dismissed Brown in this fashion on the tour, having already done it in an earlier match against an Australian XI. On that occasion he had warned Brown once before running him out. The Australian press accused Mankad of being unsportsmanlike, although some Australians, including Don Bradman, the Australian captain at the time, defended Mankad's actions. Since this incident, a batsman dismissed in this fashion is (informally) said to have been "Mankaded".
The Laws have since been changed so that a bowler may no longer "Mankad" a batsman once he has entered his delivery stride. However, under Law 42.15 it remains legal for a bowler to run out a non-striker who has strayed outside his crease after he has started his run up, but before he has entered his delivery stride. (Appendix D of the 2000 Code defines delivery stride as the stride during which the delivery swing is made; it starts when the bowler's back foot lands for that stride and ends when the front foot lands in the same stride.)
Instances of Mankading in Test cricket 
- Bill Brown by Vinoo Mankad, Australia v India, Sydney, 1947-48
- Ian Redpath by Charlie Griffith, Australia v West Indies, Adelaide, 1968-69
- Derek Randall by Ewen Chatfield, England v New Zealand, Christchurch, 1977-78
- Sikander Bakht by Alan Hurst, Pakistan v Australia, Perth, 1978-79
Instances of Mankading in One Day Internationals 
The batsman's team is listed first.
- Brian Luckhurst by Greg Chappell, England v Australia, Melbourne, 1974-75
- Grant Flower by Dipak Patel, Zimbabwe v New Zealand, Harare, 1992-93
- Peter Kirsten by Kapil Dev, South Africa v India, Port Elizabeth, 1992-93
Instances of Mankading in first-class 
Instances of not Mankading 
- Walsh – Jaffar : Courtney Walsh of the West Indies famously refused to Mankad last man Saleem Jaffar of Pakistan for backing up too far in a group match in the 1987 World Cup, but let him off with a warning. Pakistan went on to win the match while the defeat cost the West Indies a place in the semi-final.
- Rafique – Gul : The same thing was repeated in a 2003 Test match in Multan between Bangladesh and Pakistan. Pakistan eventually won the Test match by just 1 wicket. Mohammad Rafique of Bangladesh did not run out Umar Gul of Pakistan.
- Ashwin – Thirimanne : Ravichandran Ashwin of the Indian cricket team Mankaded Lahiru Thirimanne of Sri Lankan cricket team when he backed up too much before the ball was bowled in a group match in the Commonwealth Bank Series 2012 held in Australia. However the standing umpires, Paul Reiffel and Billy Bowden, after discussion asked India if they wanted to reconsider the appeal and Virender Sehwag, captaining in the absence of MS Dhoni, withdrew the appeal after discussion with Sachin Tendulkar. Sehwag claims that Ashwin had warned Thirimanne before running him out, however Mahela Jayawardene, the Sri Lanka captain, said he was not aware of the warning.
- India in Australia Test Series - 2nd Test, match scorecard, Cricinfo, Retrieved on 28 February 2009
- The Frank Worrell Trophy - 4th Test, match scorecard, Cricinfo, Retrieved on 28 February 2009
- England in New Zealand Test Series - 2nd Test, match scorecard, Cricinfo, Retrieved on 28 February 2009
- Pakistan in Australia Test Series - 2nd Test, match scorecard, Cricinfo, Retrieved on 28 February 2009
- England in Australia ODI Match, match scorecard, Cricinfo, Retrieved on 28 February 2009
- New Zealand in Zimbabwe ODI Series - 2nd ODI, match scorecard, Cricinfo, Retrieved on 28 February 2009
- India in South Africa ODI Series - 2nd ODI, match scorecard, Cricinfo, Retrieved on 28 February 2009
- Wisden 2013 pages 64 (Editor's Notes) and 614 (match report)
- "Kartik ‘Mankads’ Barrow, comes under fire". Wisden India. Retrieved 2012-08-31.
- Ashwin warned Thirimanne before 'Mankading' - Sehwag, Cricinfo, Retrieved on 21 February 2012