The WHOIS database contains information about registered domains, including owner contact details. It's used for legal purposes, troubleshooting by network administrators, checking domain availability, identifying trademark violations, and holding domain owners accountable. It helps combat spam, fraud, and illegal content. ICANN's agreements prohibit using WHOIS for marketing or spam and protect domain registrants.