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 Yahoo bot comes along, it will get a Yahoo optimized page - etc... instead of what the visitor sees.
If the contents are different from what the visior sees, then search engines regard this as spam. The search engine may not be able to tell if the page is cloaked unless someone reports it to them, however if they do find out, then your site could be banned altogether from their index. Therefore if search engine visibility is important to you - you should not use cloaking.
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.
The following sites have more information on cloaking software.
Fantomaster.com - the world's most comprehensive search engine spider database for efficient cloaking technology and top search engine rankings - Read more here.