Homonyms are words that sound and are spelled the same but have different meanings. Imagine you have two identical keys that fit different locks.
An example of homonyms (from Wikipedia): Crane (for lifting and moving loads), crane (for shutting off water, gas, etc.).
That's the whole fun of homonyms — they play a little with our perception.
Now, what are homophones? They are similar to homonyms, but here we are talking about forms of one word that coincide with forms of another. An example of homophones (from Wikipedia): three (numeral in the nominative case) and three (verb in the imperative mood, from to rub). When these words change, their homonymity disappears.
So, both homonyms and homophones are words or their forms that sound the same but have different meanings.