It is used when forms are generated and submitted:
After a form has been generated, the method "generateRequestHash" is called with the names of all form fields.
It cleans up the array of form fields and creates another representation of it, which is then serialized and hashed.
Both serialized form field list and the added hash form the request hash, which will be sent over the wire (as an argument __hmac).
On the validation side, the validation happens in two steps:
1) Check if the request hash is consistent (the hash value fits to the serialized string)
2) Check that _all_ GET/POST parameters submitted occur inside the form field list of the request hash.
Note: It is crucially important that a private key is computed into the hash value! This is done inside the HashService.