Semantics is the study of how meaning is created by words. It is sometimes compared with syntax, which concerns the rules that dictate how sentences are formed.