A hash function is used to obtain a message digest of a text, i.e. a quite short sequence of characters representing the original text.
The hash function must be such that it associates one and only one hash to a plain text (this means that the slightest modification to a document requires its hash to be modified). It must also be a one-way function, so that it is impossible to retrieve the original message from the hash. If there is a way of retrieving the plain text message from the hash, the hash function is called a "trapdoor function".
From a definition in www.commentcamarche.net.