Cloaking is a method that makes possible to display a different content depending on the entity requesting its consultation.
To be clear, thanks to cloaking, it is possible to display a different page to the search engine bots than the one displayed to humans.
Cloaking is considered as a ‘BlackHat’ method if it is used in order to fool search engines by stuffing a website with senseless keywords.
Cloaking is therefore a risky method that can drive to the penalization of a website if it is not used correctly.
Overall, Google considers that search engines bots should see the same thing as humans.