For instance, in English, [p] and [pʰ] are allophones of the phoneme /p/ because they occur in complementary distribution.
[pʰ] always occurs when it is the syllable onset and, most likely, when followed by a stressed vowel (as in the word pin).
There are cases of elements being in complementary distribution but not being considered allophones.
However, because they have so little in common in phonetic terms, they are still considered separate phonemes.
[1] The concept of complementary distribution is applied in the analysis of word forms (morphology).