A Phoneme is the smallest part of speech, all speech is made up of phonemes, they are put together to make meaningful sounds.
They are not single letter sounds, although they can be so c-a-t is three letters and 3 phonemes, cash is 4 letters and 3 phonemes.
You mentioned P4 so I'll assume you are in Scotland, you thus have at least one phoneme not common to English speakers south of the boarder, the ch at the end of Loch.
I would pronounce Lock and Loch the same way because of my accent, as for quaich, I won't even attempt it.
Linguists often use a scripted form to copy what someone is saying, ie how they are pronouncing a word, rather than the spelling and meaning, so Bath in a southern English and Northern English accent will be, linguistically distinguished, usually using IPA which you might see in some dictionaries.
I'm mightily impressed this is being taught at primary because I didn't learn until uni, and found it fascinating.