Terminology
A phoneme is a category or mental representation of a sound which may include a set of differing "surface" variants or allophones, all of which are considered by native speakers to be the same sound.
An allophone is a predictable (=contextual) variant of a phoneme.
Example: [ph] and [p] are allophones of the phoneme /p/.
A minimal pair is a pair of words which differ on only one sound in the
same position. Every minimal pair will allow you to conclude that the
differing sounds are phonemic (=contrastive=distinctive).
Example: [beId] 'bade' & [peId] 'paid' ; conclusion: /b/ and /p/ are different phonemes.
To say that 2 sounds contrast in a language (or are contrastive) means that they are different phonemes.
An overlapping distribution
between sounds is defined by shared contexts (or environments) in
which the sounds occur. If sounds are in overlapping distribution, this
is likely to be proof that they are contrastive, i.e. allophones of
different phonemes. The one exception is free variation (see below).
Another way to describe overlapping distribution in which the sounds
occur in the same environment and result in a change in word meaning is
contrastive distribution.
Complementary distribution
between sounds means that one sound occurs in an environment where
the other does not. If two sounds are in complementary distribution,
this means that their appearance is predictable by phonetic context.
Examples of contexts are: word-initial position, between two vowels,
before a voiced sound, after a voiceless stop, word-final position,
etc). To be predictable means that you can say with certainty, given
any environment, which sound will appear and which one will not.
Free variation occurs when two
sounds can occur in the same context (=environment) without the meaning
of a word changing. Example: released t and unreleased t. These can
both occur in word-final position. Therefore, their environments are
overlapping, but since no difference in meaning results from the change
from one to the other, these sounds must be considered allophones of the same phoneme.