A HOMOGRAPH is a word that has the same spelling as another word but has a different sound and a different meaning.
A HOMONYM refers to words that share the same spelling and pronunciation, but have different meanings.
A HOMOPHONES are words that sound alike but are spelled differently.
And then there are the combos:
The bandage was wound around the wound.
When shot at the dove dove into the bushes.
The dump was so full that it had to refuse more refuse.
I think it would suit you to wear a grey suit.
Be sure to charge a fair price at the Spring fair!
I cannot bear the thought of you running into a bear while camping.
I, too, want to go to on two dates.
The capitol building is located in the state capital.
Her son played in the sun even though he could be chased by a bee.
The soldier decided to desert his dessert in the desert.