Hash vs encryption

What's a hash, and how is that different from encryption?

A hash is one-way: given a value, hashing it produces an output, but that output cannot be decrypted back into the original value — there is no decryption key because it was never encrypted. Encryption is reversible by the appropriate decryption key or capability; symmetric encryption uses the same secret key, while public-key encryption uses a key pair. A HMAC (Hash-based Message Authentication Code) is a keyed cryptographic function — still one-way, but only someone with the secret key can compute the correct HMAC for a given value. See Introducing HMACs.