Phonology is the study of contrastive speech sounds, called phonemes. In English, /k/ and /g/ are separate phonemes. Replace one with the other and you get a different word: dock, dog.
Phonetics is the study of how speech is articulated and comprehended. The two contrastive phonemes /k/ and /g/ can sound quite different depending on the speaker, place in the word, and dialect. In my dialect, the phonetic difference between "dock" and "dog" isn't the last consonant, it's the vowel length. The vowel in "dog" is longer, and the last consonant is almost the same in both words. So a phonetician (which I sort of used to be) might look at spectrograms of these words and determine how much longer the vowel is and exactly what the difference is in the final consonant, if any. Phonetically the words might be represented as [d?k] and [d??k] where [?] indicates a longer vowel. But on a more abstract level, that is phonologically, they would be /d?k/ and /d?g/.
now that i've bored everyone to tears...