Phonology is the study of how sounds are organized and used in natural languages.
Discussion
The phonological system of a language includes
an inventory of sounds and their features,and
rules which specify how sounds interact with each other.
Phonology is just one of several aspects of language.It is related to other aspects such as phonetics,morphology,syntax,and pragmatics.
Here is an illustration that shows the place of phonology in an interacting hierarchy of levels in linguistics: