Doing a phoneme inventory
Part of the phonological study of a language involves looking at data (phonetic transcriptions of the speech of native speakers) and trying to deduce what the underlying phonemes are and what the sound inventory of the language is. Even though a language may make distinctions between a small number of phonemes, speakers actually produce many more phonetic sounds. Thus, a phoneme in a particular language can be pronounced in many ways.
Looking for minimal pairs forms part of the research in studying the phoneme inventory of a language. A minimal pair is a pair of words from the same language, that differ by only a single sound, and that are recognized by speakers as being two different words. When there is a minimal pair, the two sounds constitute separate phonemes. (It is often not possible to detect all phonemes with this method so other approaches are used as well.)