Phonology is the study of how sounds are used in languages. In particular, phonology is used to show how patterns of sounds are used to build a language. It is very closely related to phonetics, but the main difference is that we use phonetics to analyze how all human sounds are made, while phonology only analyzes patterns of sounds in individual languages. An example of a phoneme is the sound /d/ in dew vs. the sound /r/ in rue. The difference in these two sounds tell us that dew and rue are different words.
While Phonology looks at individual sounds, syntax analyzes the way that words are strung together in a language to form parts, like phrases and clauses, and then even sentences. A language's syntax is divided into two parts. First, syntax looks at individual parts of speech, such as nouns, verbs, and adjectives. Second, syntax looks at the functions of words within the sentence, such as the function of a noun as a subject and object. For example, in the sentence, "The cat sat on the mat," both cat and mat are nouns. However, the English language makes the first noun in a sentence the subject. So we know that cat is the subject of the sentence; the subject that is doing the doing; while, mat is the object that is sat upon.
Finally, while syntax shows us how we string words together to make meaning, the study of semantics analyzes how users derive meaning from language, especially with respect to language change, which is the development of language over time. An example of semantics would be how one impacts a listener by saying "Y'all gots me some chocolates?" vs. "Do you have any chocolate you can share with me?"
Phonology is the study of words, especially spoken words. It is the formal term denoting all examinations of the communication media of speech and writing. Example: “The development of regional accents is a subject for phonology, not sociology.” Syntax is simply the Greek word for “order,” and in fact can be used to discuss the order of any process – for example, the order in which a mechanic tunes a motor, the “syntax” of the steps – what steps come first, what next, etc. Example in language: “In English, the rules of syntax call for an adjective to precede the noun it modifies (big, black dog); in French, the syntactical rules call for the adjective to follow the noun (Vin Rose, red wine). Another example: “Questions have a reverse syntax from statements – the predicate comes before the subject.” Semantics is the study of subtexts, connotations rather than denotations, the subtle weight that word choice gives to discourse. Example: “The rebels destroyed law and order” vs. “The Freedom Fighters ousted the corrupt Establishment.” Semantics are apparent in advertisements: “Treat your family to a greasy, fat-laden, unhealthy dinner” would not be a good Macdonald’s ad.