Cloaking is an unethical practice of using server side scripting to give a user one version of a web page, while a search engine spider or bot receives a different version
Why is it unethical? Because it is designed to manipulate the SERP results and is not a natural ranking factor. Apart from it being unethical it can also result in the offending domain being banned from the search engine directories.