Syntax is the study of how words are combined to form phrases and sentences, and how these structures are interpreted. This includes the rules that govern the arrangement of words in a sentence (word order), as well as the relationships between words (e.g., subject-verb agreement).
While other branches of linguistics, like morphology (word structure) and phonology (sound system), might contribute to understanding word order, syntax is the primary focus on this aspect of language.