If you have ever seen Pygmalion, or more likely My Fair Lady, then you may be familiar with the Professor of Phonetics. The study of human speech sounds is nowadays split into two fields: phonetics and phonology.
Phonetics is the study of acoustics and articulation: How, physically, are various sounds made? How do we recognise which are which? Which sounds are easier to make? Do people aim for individual sounds, or for whole phrases? What is 'stress'? Is it the same in every language?
Phonology is the study of the human perception of speech sounds.
A phoneme is what speakers perceive to be a sound of their language. I would say "it's a letter", but no writing system actually uses one-letter-per-phoneme (except the International Phonetic Alphabet, designed for this purpose). Still, it's close enough: /l/, /t/, /i/, and /n/ are all phonemes.
A phoneme is a unit of sound that doesn't actually mean anything, but which contrasts with other phonemes to make different words.
For example, 'bin' and 'pin' mean different things in English, so we know that /b/ and /p/ must be different phonemes.
If you can find a pair of words that differ in meaning by only one sound, then you know that those sounds are phonemes.
An allophone is a pronunciation of that phoneme which varies depending on... well, lots of things. Largely phonological factors - where it is in the word, is it in a stressed syllable, does it have certain other sounds next to it - but it can also depend on sociological factors: who you are talking to, where you are, what the topic is.
For example, there are at least two different sounds in English we call "l": light l and dark l. One of them comes at the beginning of words, and one at the end; but because there are no words in which the difference in meaning depends on the /l/ used - we just think of them all as /l/.
Try saying 'light', stopping after the l. Make that sound a few times, with your tongue stuck behind your teeth.
(Don't worry if you're reading this on public transport. People eventually get used to it, especially if you are clearly reading something and not just crazy. Yes, that is the voice of personal experience.)
Now say 'dull', and stop after the l. Your tongue is still stuck behind your teeth, but you should be able to hear a subtly different sound.
Another example: English vowels become 'nasalised' before nasal (nose) sounds like /n/. So you would think that 'bed' and 'Ben' have the same vowel in them - and they do have the same phoneme. But if you say 'be-' and stop before the d, and then say 'Be-' and stop before the n, you will find that the latter sounds slightly French - it is a nasal vowel.
Now, which sounds are phonemes and which are allophones is one of the things that varies from language to language. As we've just seen, nasal vowels are allophones of plain vowels in English - but in French, changing from one to the other can change the meaning of the word.
The number of phonemes in a language is also not a constant. English has somewhere around 45 phonemes (depending on the dialect), whereas Hawaiian may have as few as 13 (depending on how you count them), and some languages have over 140 (though those are rare).
They are basically solving the transmission problem in different ways: if your only sounds are 'ma' and 'ti', they are easy to tell apart, but you need very long words. More sounds means more meanings per short word, which is nice and quick - but means they are harder to tell apart, resulting in conversations like "Oh, he's physically capable. I thought you said he was intellectually challenged, and I wondered what that had to do with the marathon..."