The leading case and the starting point when considering any adverse possession claim arising under the law that existed prior to the Land Registration Act 2002 is JA Pye v Graham (Oxford) Ltd v Graham [2002] UKHL 30. In essence the squatter must establish that he has been "in possession" for 12 years; ie that he has been in factual possession and has had an intention to possess. If so he will be have been in "adverse posession". A full explanation of the decision is to be found here.
The law relating to adverse possession changed substantially when the Land Registration Act came into force on 13 October 2003. For a summary see the article on this site by Nic Madge. However, the concept of "adverse possession" has continued into the new system; and there are still many cases where all the old law will apply.
Various matters relating to adverse possession can also be found on the other pages in this section of the site - see the contents column on the left.