Syntax is the study of sentence structure and the rules for constructing sentences, while grammar refers more broadly to the rules of a language, including syntax and morphology. Syntax examines what words go where in a sentence and the relationships between them. Grammar sets the standard for correct usage of a language through rules governing areas like agreement between words. Traditional grammar describes syntactic structures through categories like nouns and verbs, while generative grammar aims to provide rules for predicting grammatical sentences in a language.