The term often indicates that two superficially-different elements are the same linguistic unit at a deeper level, but more than two elements can be in complementary distribution with one another.
Complementary distribution is the distribution of phones in their respective phonetic environments in which one phone never appears in the same phonetic context as the other. When two variants are in complementary distribution, one can predict when each will occur because one can simply look at the environment in which the allophone is occurring.
Complementary distribution is commonly applied to phonology in which similar phones in complementary distribution are usually allophones of the same phoneme. For instance, in English, and are allophones of the phoneme /p/ because they occur in complementary distribution. always occurs when it is the syllable onset and followed by a stressed vowel (as in the word pin). occurs in all other situations (as in the word spin).
There are cases of elements being in complementary distribution but not being considered allophones. For example, English and are in complementary distribution: occurs only at the beginning of a syllable and only at the end. However, because they have so little in common in phonetic terms, they are still considered separate phonemes.
The concept of complementary distribution is applied in the analysis of word forms (morphology). Two different word forms (allomorphs) can actually be different "faces" of one and the same word (morpheme). An example is the English indefinite articles a and an. The usages an aardvark and a bear are grammatical, but the usages *a aardvark and *an bear are ungrammatical (as is marked with "*" in linguistics).