Word-sense disambiguation (WSD) is an open problem of natural language processing, which governs the process of identifying which sense of a word (i.e. meaning) is used in a sentence, when the word has multiple meanings.
A rich variety of techniques have been researched:
Supervised learning approaches have been the most successful algorithms to date.