Cloaking is commonly referred to as a black hat, or unethical, SEO practice. Cloaking consists of deceiving search engine crawlers by directing them to web pages that are not actually visible on the domain that the crawlers are trying to analyze. Usually, these false pages are loaded with keyword rich content and search engine optimization designed to boost the search results ranking of the web page.
However, since cloaking is an artificial method of boosting rankings, most search engines frown on the practice of cloaking, and will penalize web sites that they find to be using cloaking as a method of search engine marketing.
To properly understand cloaking, you have to understand how the search engines scan sites to determine their relevance, popularity, and ultimately what their position should be in the search results rankings. The main method by which they accomplish this is through crawlers, which scour the internet analyzing web pages for keywords, inbound links and other factors.
Cloaking works when a hidden web page is armed with a CGI script that scans the IP address of incoming visitors. If the IP address is determined to be that of a regular human user, then they will be directed to the home page of the site. However, if the cloaking page determines the visitor to be a crawler, then they will direct it to a page loaded with keywords and optimized content designed to trick the crawler into believing the site is of more value than it is, and thus award it a higher ranking.
Cloaking is similar to doorway pages, in that it is a practice used solely for the purpose of SEO marketing. The pages represented by cloaking serve no actual purpose, and are of no use or benefit to the average user. Therefore cloaking is seen as spamdexing, and will be punished by search engines. While some web optimizers still employ this practice, in this day and age there are far better SEO tools that you can use than cloaking to boost your ranking in a lasting manner.