website that uses cloaking recognizes search engine spiders by their IP address. It returns web pages to search engine spiders that are different from the web pages that web surfers see. Usually, the cloaking software creates hundreds of web pages that are optimized for a special search term so that search engine spiders get the impression that the website contains a lot of relevant information about a special topic.
If you often search on Google then you probably can confirm that you can get good results with cloaking. You can often find web pages on Google that have little to do with the description on the result page.
Cloaking generally means to present different version of web page contents from of search engines to search robots and human visitors based on their browser's user agent or IP address. It's a deceptive method used to cheat search engines in order to rank well for desired keywords.
Not always but in most of the cases, cloaking is also used to trick users to visit certain websites based on their description in search engines. For example a user searching for some product may click on a website in search engine based on its description and title but the final website will not be the one described in SERP's. It will be a totally different one. Therefore, these practices that are designed to manipulate search engines and deceive users by directing them to sites other than the ones they selected, and that provide content solely for the benefit of search engines should be avoided.