Phonemes and allophones are both component parts of speech sounds. Phonemes are related to speech meaning while allophones are related to speech realizations, or enunciations. The primary relationship between phonemes and allophones is that phonemes become spoken language when allophones are enunciated. In contrast, they become written language when organized in meaningful constructs within a meaningful language system, such as a dialect or standardized language.
Another relationship between phonemes and allophones is a reverse relationship. The same or similar allophones (enunciations, realizations) of a phoneme occur in many languages. For example dark / l /, as in milk, occurs in English, Gaelic and Turkish. However, dark / l / indicates a phoneme of meaning only in Gaelic and Turkish; it indicates no meaning in English. In other words, if you pronounce "bell" with a dark / l / or a light one in English, the meaning does not change. Take another example: the allophone / s / occurs in English and Japanese. In English it indicates a phoneme of meaning, as in shoe(s), horse(s) and shout(s), while in Japanese / s / relates to no phonetic meaning regardless of the allophonic realization.
[Examples drawn from "English Phonology: Lecture 1: Phonemes and Allophones; Describing English Sounds." Barış Kabak, Ph.D. Department of Linguistics, University of Konstanz, Germany.]
Phonemes are distinct sounds in a language that allow words to be distinguishable from each other. For example, the sounds "p" and "m" distinguish "mat" from "pat." Phonemes are also called the linguistically contrastive or significant sounds in a given language, and they are usually shown by minimal pairs such as "mat" and "pat" that only differ by a single speech sound in the same location in both words. There are 44 phonemes in English (though there are 26 letters, so some phonemes are made up of more than one letter).
Allophones are sounds that do not contrast within a language. Allophones are sounds, while phonemes are sets of sounds. A phoneme is a set of allophones or separate non-contrastive speech segments. Replacing one allophone with another does not create a new word but only a differently pronounced word. For example, the "n" sound in "tenth" (denoted [n̪]) is an allophone of the "n" sound in "net" (denoted [n]), and these two different allophones are variations of the phoneme |n|.