They can be used to contrast sounds.
Example
‘But' and ‘bat' are a minimal pair. Only the vowel sound is different.
In the classroom
Minimal pairs are a useful way to highlight a sound in a meaningful context and also to show the learner how important correct pronunciation of the sound is. Activities to practise minimal pairs include reverse dictation (the teacher writes what the learners say on the board), tongue twisters and drilling.
Further links:
https://www.teachingenglish.org.uk/article/same-sound-different-sound
https://www.teachingenglish.org.uk/blogs/rod-bolitho/teacher-induced-neuroses-pronunciation-angst