DNS record types explained

What each record does, how to write it, and the mistakes that break websites and email.