This can be compared with a homonym, which has the same spelling and sounds the same but has a different meaning.
Example
The words 'rain', 'reign' and 'rein' are homophones. 'Set' is a homonym.
In the classroom
Homophones are useful to help learners understand that the relationship between spelling and sound is not consistent in English. Dictations, poems, jokes, and word games such as bingo are all used to practise this area.
Further links:
https://www.teachingenglish.org.uk/article/same-sound-different-sound
https://www.teachingenglish.org.uk/article/homophone-game
https://www.teachingenglish.org.uk/article/homophones-dictation