A phoneme is a sound that can be used to distinguish words that would
otherwise sound alike to speakers of a certain language. In English for
example the b and the p are phonemes; every native speaker of
English will perceive the words bin and pin as different words,
even though their is only a minimal difference in pronunciation.
Note that a phoneme can be pronounced in different ways by different speakers
or even pronounced differently by the same speaker under different
circumstances. For instance, the p in pin is followed by a puff
of air (aspiration), but in spin this aspiration is absent. In a
language like Thai the difference between aspirated and unaspirated p
is actually used to distinguish words that are for the rest pronounced the
same, and there the two p's are two different phonemes. However, in
English the difference between an aspirated and an unaspirated p is not
very important. If a Dutchman or a Frenchman pronounces the word pin
without aspiration, a native speaker will certainly notice a "foreign accent",
but he will not misunderstand the word.
It is very important for somebody who tries to learn a foreign language that
he can distinguish the phonemes of that language, both passively and actively
(i.e. when listening and speaking). Acquiring a perfect accent is less
important. A Spaniard learning English can pronounce the h in
help as the j in Spanish junta, and an Englishman who
is learning Spanish can safely pronounce the Spanish j as an English
h without risking to be misunderstood. For the Spaniard the English
h is just a typical English way of pronouncing the j, and for
the Englishman the Spanish j is just a rough variant of his h.
On the other hand, when both the Englishman and the Spaniard would want to
learn Duch they should take care to differentiate between the Dutch g
(pronounced like the Spanish j) and the Dutch h (pronounced
more or less like the English h), or else confusion between words like
geel (yellow) and heel (whole) might arise.