Cloaking is a way of serving the search engine spiders a different optimized page to what the website visitor sees. So if the Google spider / bot comes along to index your page it will serve it a page specially designed for Google. If the Altavista bot comes along, it will get an Altavista optimized page - etc...
Cloaking software serves the spider bot a 'content-oriented' page that is optimized for that specific engine. It is not the same page served to the surfer.
One advantage of cloaking is that people cannot "steal" your code. If you spend time optimizing your pages, it is simple for someone to copy that page and change it slightly if they are competing with you. With cloaking, there is no way they can see the code that got you a high ranking.
However many search engines regard it as "cheating" so if you are going to use it, you have been warned. Some sites register another domain name that will redirect to the main website.