Also called the "6 out of 12 rule". To begin, let's have a look at the IDIs...
"...There is no restriction on the number of visits a person may make to the United Kingdom nor any requirement that a specified time must elapse between successive visits. The fact that a person has made a series of visits with only brief intervals between them would not, in the absence of any other relevant factors, constitute sufficient ground for refusal.
It is reasonable, however, for the immigration officer to consider the stated purpose of the visit in the light of the length of time that has elapsed since previous visits. A visitor should not, for example, normally spend more than 6 out of any 12 months in this country (but see Section 3 of this chapter in the case of visitors for private medical treatment)..."
Commentary: The so-called 'spent-leave' rule is not mentioned in the official UK immigration rules, but rather it appears in an ancillary document called the 'Immigration Directorate Instructions' (or IDI's). The IDI's help immigration officials interpret the law by giving examples and other practical information. Or to summarize, the IDI's are guidance.
The guidance states that a visitor should normally spend a maximum of six months out of any twelve months in the UK; and attempting to stay for a longer period is a signal that the applicant is not a genuine visitor. Also there is a justifiable perception that a person who visits the UK frequently and stays for a long time is using the visitor programme as a prelude to settlement.
It is unfortunate that a lot of otherwise reliable internet resources refer to this guidance as a matter of law. But in practice, many people receive multiple visitor visas which result in them staying for longer than six months. And many people who stay for less than six months are refused entry. Applying the 'spent leave rule' to any given person is entirely up to the Immigration Officer who conducts the landing interview, and the factors taken into account are much broader than spent leave.
A court decision on this rule is found in "Oppong (visitor – length of stay) Ghana  UKUT 00431 (IAC)" stated...
An application for a visit visa which, if granted, could result in permission to spend more than 6 of 12 months in the United Kingdom is likely to be scrutinised rigorously but it is wrong to refuse someone entry clearance as a general visitor just because they have spent more than six of the last twelve months in the United Kingdom. In certain circumstances a person can utilise paragraph 41 in order to visit the United Kingdom to provide temporary care for a person present here.
In this case, the court established that caring for a relative is a tenable argument against refusals based upon the spent leave rule.
I entered the UK in July and it is now January. Does my six months automatically renew because it is a new calendar year?
No. Calendar years have nothing to do with it. It is a rolling year which begins on the date you last left the UK.
I entered the UK in July, then in December I went to France. When I returned to the UK, the IO stamped my passport with a visitor visa expiring in June, and this will make more than six months in a twelve month period. Am I in breach?
No. If your current visa has not expired, then you are not in breach. The 'spent-leave rule' only works upon admission or application, and if you were "stamped in" for another six months, then you may stay without violating the 'spent-leave rule'.
What about channel hopping? "Channel hopping" in an immigration context means to "hop over to Calais" and "hop back to Dover" (or any other equivalent pair of UK and European port cities) all on the same day. The effect of this activity is to renew one's UK visitor visa for another 6 months. It is legal, and there is no legal limit on the number of times a person can channel hop. Remember, however, that each entry presents the occassion for a landing interview with a British Immigration Officer, and successive channel hops have a diminishing success rate. As a working figure, Transpondia advises that the third back-to-back channel hop elevates the probability of a bounce to about 99%. But as in all things, your mileage may vary. To summarize, channel hopping is totally legal and when successful the person extends their visa by 6 months.
Update 18 May 2012
In a recent case heard by the Upper Tribunal entitled "Sawmynaden (Family visitors – considerations)  UKUT 00161(IAC)", the appellant applied for a family visit visa and was refused. The ECO provided this rationale...
[...] With your proposed trip, you are intending to spend a further six months in the UK (which would make a total of 14 ½ out of the last 18 months in the UK). Whilst there is no restriction on the number of visits a person may make to the UK, nor any requirement that a specified time must elapse between successive visits, it is reasonable, however, for the ECO to consider the stated purpose of the visit in the light of the length of time that has elapsed since previous visits. A visitor should not, for example, normally spend more than six out of any 12 months in the UK.
In view of all the above, I do not consider that your actions are within the spirit of the immigration rules for family visitors. I note that you are widowed and that your two daughters and six siblings all live in the UK. Given that you have been spending long periods of time in the UK over the last few years, this raises doubts as to your true intentions.
Given all of the above and considering your application as a whole, I am not satisfied that you are genuinely seeking entry as a visitor for a limited period as stated by you, not exceeding six months and that you intend to leave the UK at the end of the period of the visit as stated by you (as required by Paragraph 41 (i) and (ii) of the Immigration Rules.”
In other words, the ECO was invoking the spent leave rule to cast doubt on the applicant's intent to comply with the provisions of Paragraph 41 of the rules. The tribunal considered the case and had this to say...
To make a long story short, the appellant won the appeal. What we learn from this case is that guidance is simply guidance and not the law. As a side-note, we have to reflect with sadness upon the government's recent decision to curtail appeal rights for family visitors. As shown by the above case, justice would have permanently eluded the applicant and caused the unfair and illegal loss of family relationships.