If we are talking about phonology of course phonetics must be explain too. Because both phonology and phonetics can be generally described as the study of speech sounds. Phonetics is more specifically the study how speech sounds are produced, their physical properties, and how they are interpreted.
Distribution of speech sounds
In this case we explain about concepts, the concepts of phoneme and allophone are related with another important concept in phonology, whether sounds are contrastive or not, if two sounds are separate phonemes, then the two speech sounds are contrastive, if the two phones are allophones of the same phoneme, then they are non-contrastive. Essentially, a pair of phones are contrastive if interchanging the two can change the meaning of a word, conversely, two sounds are non-contrastive if the alternation of the phones does not result in a change of meaning.
Actually the mapping between phonemic and phonetic element is accomplished by using phonological rules, A speaker’s knowledge of phonological rules allows him or her to “ translate “ phonemes into actual speech sounds; this change from the underlying phonemic form to the actual phonetic form of a word by means of phonological rules can be represented with a diagram:
As an example, please consider the English word can /ka n/. this word has a final /n/ sounds in this phonemic form, and it is pronounced with a final [n], if we listen carefully of course we find the final consonant of can is often [m] or [ ], and I think we can see the following example in this below,
I can see [ay ka n si]
I can play [ay ka m ple]
I can go [ay ka go]
And to show, /n/ is pronounced as [m] when it precedes a labial stop, and as [ ] when it precedes a velar stop, this fact about English as a descriptive rule:
/n/ is pronounced as [m] before a labial stop
[ ] before a velar stop
[n] everywhere else.
Source: Tracey L. Weldon, Language Files in sixth edition, 1994