Here is a graphic showing the various relationships:
What you're asking about is a homograph
The linked website goes on to say about them:
Homographs are words that are spelled the same but have different meanings. These words may have the same or different sound. For example, the word, a tear in her eye, and to tear down the house are homographs. In this situation, tear as a noun and tear as a verb are spelled the same, pronounced differently, and have different meanings. Citing another example, a birthday present and to present my friend to my mother indicate the use of present as both a noun and a verb. The pronunciations are different because when present is used as a noun, the stress is on the first syllable of the word. When present is used as a verb, the stress is on the second syllable of the word. Students should be taught the rule that for two syllable words used as both nouns and verbs, the stress is on the first syllable for nouns and on the second syllable for verbs.
Also as @RegDwigнt points out:
A capitonym is a special type of homograph that is formed just by changing the capitalization of the word.