In the sport of cricket, ball tampering is an action in which a fielder illegally alters the condition of the ball. The primary motivation of ball tampering is to interfere with the aerodynamics of the ball.
Under Law 42, subsection 3 of the Laws of Cricket, the ball may be polished without the use of an artificial substance, may be dried with a towel if it is wet, and have mud removed from it under supervision; all other actions which alter the condition of the ball are illegal. These are usually taken to include rubbing the ball on the ground, scuffing with a fingernail or other sharp object, or tampering with the seam of the ball. 
Generally, the purpose of altering the state of the ball is to achieve more favourable bowling conditions. Examples of ball tampering would include a fielder applying a substance, such as lip balm or sweetened saliva, to shine one side of the ball or pick the seam of the ball to encourage more swing. Conversely, roughening one side of the ball by use of an abrasive or cutting surface (such as boot spikes or bottle caps) is also ball tampering.
Altering a ball legally
Using spit and/or sweat is common and, for practitioners of swing bowling, integral. The moisture gained from spit or sweat when combined with polishing, smooths out one half of the ball which in turn allows air to pass over one side of the ball more quickly than over the other. When bowled correctly, a bowler can get the ball to move from one side to the other through the air. Also, it is common for bowlers to rub the ball against their clothing to dry or polish it, as seen in most cricket matches.
The umpires are responsible for monitoring the condition of the ball, and must inspect it regularly. Where an umpire has deemed a fielder to be guilty of ball-tampering, five penalty runs are awarded to the batting side, and the ball must be immediately replaced. The replaced ball is normally chosen by the umpires, in which case the ball chosen should match the condition of the previous ball (before tampering) as closely as possible. Depending on additional agreements laid out before the beginning of a series of matches, the batsmen may be instead permitted to choose the ball from a selection of balls in various stages of use.
A bowler guilty of ball-tampering can be prohibited from continuing to bowl in that innings if he is found to be repeatedly ball-tampering. Following the conclusion of play, additional sanctions are usually brought against a ball-tamperer, as it is considered a serious offence. The captain may be equally penalized, as he is responsible for the conduct of his players on the field.
The use of foreign substances to polish the ball, while illegal, is in some corners considered to be relatively common, and passes without incident or sanction. Substances which have been used for this purpose include hair gel, sugar and lip balm. 
In addition, picking at the threads of the main seam or 'lifting' the quarter seam to aid conventional and reverse swing respectively are considered illegal. Modifying the quarter seam can be particularly difficult to detect or prove. 
However, there have been a number of high-profile instances of ball tampering, particularly in international cricket due to the increase in television coverage. Waqar Younis became the first player to receive a suspension for ball-tampering after a match in 2000. 
Michael Atherton in 1994
In the "dirt in pocket" affair, then England captain Michael Atherton was accused of ball tampering during a Test match with South Africa at Lord's in 1994 after television cameras caught Atherton reaching into his pocket and then rubbing a substance on the ball. Atherton denied ball tampering, claiming that he had dirt in his pocket which he used to dry his hands. He was also accused of lying to the match referee. Atherton was summoned to the match referee and was fined £2,000 for failing to disclose the dirt to the match referee. 
Sachin Tendulkar in 2001
In the second Test match of India's 2001 tour of South Africa, at St George's Park, Port Elizabeth, match referee Mike Denness suspended Sachin Tendulkar for one game in light of alleged ball tampering.  Television cameras picked up images that suggested Tendulkar was involved in scuffing the seam of the cricket ball.  The incident escalated to include allegations of racism, and led to Mike Denness being barred from entering the venue of the third test match. The ICC revoked the status of the match as a Test as the teams rejected the appointed referee. The charges against Tendulkar and Sehwag's ban for excessive appealing triggered a massive backlash from the Indian public. ICC later cleared Tendulkar of ball tampering charges. 
Pakistan in August 2006
In 2006, an alleged ball-tampering issue overshadowed a Test match between Pakistan and England, whereby Pakistan refused to take to the field for the evening session after being penalised for ball-tampering in the afternoon. Television cameras caught the umpires discussing the condition of the quarter seam.  Pakistan are believed to have intended a protest against the decision by delaying their return after tea, however while they were refusing to play, the umpires awarded the game to England in accordance with the laws of cricket. 
The controversy arose when the umpires, Darrell Hair and Billy Doctrove, ruled that the Pakistani team had been involved in ball tampering. They awarded five penalty runs to England and a replacement ball was selected by England batsman Paul Collingwood. Play continued until the tea break, without any Pakistani protest. After the tea break, the Pakistani team, after having mutually confirmed that no ball tampering had taken place and given consideration to the severity of the implication, refused to take the field. The umpires then left the field, gave a warning to the Pakistani players, and returned once more 15 minutes later. After waiting two more minutes the umpires removed the bails and declared England winners by forfeiture. A deal was brokered between the English and Pakistani cricket boards to allow the match to continue, and the Pakistani team did take to the field 55 minutes after the umpires first took to the field for the resumption of play. Umpires Hair and Doctrove, however, declined to continue the game maintaining their decision that Pakistan had forfeited the match by refusing to play.
The impasse continued late into the evening.  Pakistan captain Inzamam ul-Haq claimed that Darrell Hair did not inform him or the rest of his side of the reasons why the ball was replaced, and that Hair had implied that Pakistan were cheating.  At 19:50 UTC it was finally announced at a press conference that the Test was called off. The ECB's statement said that England were awarded the match by the umpires as Pakistan refused to take the field after being warned that under law 21.3, failure to do so would result in them forfeiting the game. This is the first time a Test match has been decided this way. 
The England and Wales Cricket Board refunded fourth-day spectators 40% of their ticket price (after deduction of an administration fee), and gave an automatic 100% refund to those with tickets for the fifth day. It later asked the Pakistan Cricket Board to pick up the £800,000 costs of doing this, which the PCB refused to do. In March 2007, the PCB and ECB reached a settlement where Pakistan would play a Twenty20 International in England and waive their fees.
As a result of Pakistan's forfeiting of the game captain Inzamam was charged and found guilty of "bringing the game into disrepute", though he was cleared of the charges relating to "changing the condition of the ball".  In January 2008, Pakistan's cricket board asked the International Cricket Council to change the official result to "match abandoned" or "match drawn" on the basis of having been subsequently cleared of ball-tampering by an ICC tribunal.  In July 2008, the International Cricket Council (ICC) changed the result of the match to a draw,  though in October 2008 the Marylebone Cricket Club (MCC) released the statement "The ICC has no power under the laws of cricket to decide that results should be altered, whether it feels it's ‘inappropriate’ or otherwise,"  The decision also angered former players including Michael Holding who at the time was a member of the ICC cricket committee. Holding felt that Pakistan's refusal to play should not go unpunished even though they were not guilty of ball-tampering,
"I have just written my letter of resignation to the ICC cricket committee because I cannot agree with what they've done," Holding said while commentating for Sky Sports during a domestic match in England. "That game should never, ever be a draw. When you take certain actions, you must be quite happy to suffer the consequences."
On 1 February 2009, the ICC reversed their earlier decision, and changed the match result back to a win for England. 
Anderson and Broad 2010 incident
In January 2010, England bowlers Stuart Broad and James Anderson were accused of ball tampering by rubbing the ball on the ground with their spikes in the third Test Match against South Africa.  Broad maintained that was just being lazy, because it was 40 degrees Celsius in Cape Town that day.  Andrew Flower said in his defence that "the scoreline suggested that there was obviously no ball tampering."  Nasser Hussain who had captained Anderson said: "Stuart Broad and James Anderson were wrong to behave in the manner they did and I've no doubt that if a player from another country did the same we'd have said they were cheating."  No charges were formally placed by South Africa even though they made the accusations at a press conference. 
Shahid Afridi ball tampering incident, 2010
Shahid Afridi, standing in as the Pakistani Captain, received a two T20 international match ban for ball-tampering in a match against Australia in January 2010. He was caught on camera biting the cricket ball in a bizarre attempt to readjust the seam of the ball. The ball was eventually replaced.     He reported to Hindustan Times that he was trying to smell the ball  but he pleaded guilty for ball tampering.
Australia v Sri Lanka, 2012
South Africa v Pakistan, 2013
While fielding on during the third day of the 2nd Test, in Dubai, cameras captured footage of South Africa fielder Faf du Plessis scuffing the ball against the zip on his trousers. The on-field umpires penalised South Africa by adding 5 runs to Pakistan's total, and changing the ball.  The match referee imposed a 50% match fee fine on du Plessis after the fielder pleaded guilty, although the team manager Mohammad Mosajee maintained that penalty was "harsh", and the team decided not to challenge to finding as it may have led to heavier sanctions. Despite the "guilty" plea, team vice-captain AB de Villiers maintained that "we are not cheats" and team captain Graeme Smith denied that their participation in ball tampering tainted the series-levelling win as South Africa went on to record an innings-victory during the Dubai test, to tie the series 1-1. 
During the same match, footage of South African medium-pace bowler showing Vernon Philander apparently scratching the ball with his forefinger was also brought under scrutiny, but ultimately was not considered by the match referee to have constituted any illegal ball-tampering.
South Africa v Sri Lanka, 2014
For the second time in nine months, the South African test side found itself in a ball-tampering scandal, this time with medium-pace bowler Vernon Philander found guilty of tampering with the ball during the 3rd day of the Galle test against Sri Lanka in 2014.  Philander was found to have breached clause 42.1 of the Laws, "scratching the ball with his fingers and thumb", and was fined 75% of his match fee. South Africa were to go on and win the test by 153 runs.
This incident followed speculation by Australian test batsmen David Warner in February 2014 over the South African team's practices in altering the state of the ball during Australia's tour to South Africa. Speaking to Sky Sports Radio. Warner commented the South African fielders' more "obvious" use of throwing the ball into the ground on return throws after fielding, and South African wicket-keeper AB de Villiers' habit of getting "the ball in his hand and with his glove wipe the rough side every ball."  Warner was later fined 15% of his match fee for the comments he made, under an ICC Code of Conduct breach.