Syntax is the study of how words form sentences and how the rules governing their arrangement shape meaning and structure.