In linguistics, syntax focuses on the arrangement of words and phrases to form sentences and explores the rules governing sentence structure. Grammar, on the other hand, encompasses a broader set of linguistic rules governing language usage, including syntax but also word choice, tense, and verb conjugation.