Hidden text is an old black hat SEO practice which consists to hide text in page. The goal is to give more optimized text and more keyword density to Google’s algorithm without hindering page reading.
In SEO prehistory hidden text consisted of text with very small font, text at the bottom of the page or invisible text with same color than the background.
In recent years more sophisticated techniques as been used with Ajax code.
Of course, spammy hidden text is against Google guidelines and may be sanctioned when detected.
Some kinds of hidden text are considered as legitimate by Google when the process is used to relieve the visual content of a webpage. For instance, it is allowed to hide details about a product in the page code when these details are revealed by a "show details" button.