To answer your question directly, yes, MySQL has hashing functions. They are listed here.
However, if you really want to store your passwords securely, read this article.
UPDATE
Say, for example, you're using SHA2()
to hash your passwords (use your own judgement after reading the above article to determine which hashing algorithm to use).
To compare an authentication string (read: "User-entered password from login screen") to the stored password (read: "Password that the original user entered as his/her password"), you would do something like this pseudocode:
$passwordHash = getPasswordForUser($userName);
$authenticationHash = sha2($authenticationPassword);
if ($passwordHash === $authenticationHash) {
// successful login. do something here.
}