What is Cloaking in SEO
Cloaking is simply a technique in which, on a same url/address, search engine spider is served with a different version of web page as compared to the one which is served to the user. It is a Blackhat-SEO technique and is used to fool search engine. Geeks do this to gain unnatural rankings for irrelevant keywords.
It is done by differentiating between user agents basing on the IP address or by HTTP header. Basically if it is determined that the user-agent is a search engine bot then it will be taken to a page which is quite relevant to the search query but if the user-agent is other than the bot then any other page of webmaster?s choice will be served. The page which a real user visited was actually not what he wanted. Search engine was unable to index the real content and based his assessment on only that portion which was designed for search engines, instead of the one which is for the user. Google strictly penalizes this technique.