Syntax is the study of the rules by which we use words to form sentences and phrases and meaning.
For example, the rules of syntax say that an English sentence can be formed thus:
The rules of syntax say this is not permissible.
Syntax can be compared to Grammar.