A homonym is one of two or more words spelled and pronounced alike but different in meaning (as the noun quail and the verb quail).
I've heard the word "homonyms" used to describe words that are just
pronounced alike (but not necessarily spelled alike) but have different
meanings (as the here and hear). These, however, are homophones.
Homographs are words that are spelled the same but differ in meaning or derivation or pronunciation.
Great! Now that we've got that out of the way...
"compliment" -- Here is an excerpt from a business proposal
written by a company that services Hewlett Packard computers: "On-site and off-site HP-UX Operating System support. This service is designed to compliment
your company's internal I.S. staff by providing critical system support during and after business hours including the weekends."
How will they compliment our staff, I wonder... "Oh, you're looking
good today, have you lost weight?" No spell-checker will catch this
homophone.