Syntax refers to the set of rules that govern how a language forms its sentences. The most obvious feature of the syntax is word order, and it generally functions to show the relation between words in a sentence.
Syntax is often differentiated from morphology in that syntax operates at the sentence level (with entire words) and morphology operates within the word, with morphemes. In the world of linguistics there is much debate over whether or not these may actually be one and the same, but for conlanging, it can be useful to think of them as separate.
Word order generally refers to the basic ordering of arguments in relation to the predicate (the main verb and any auxiliaries) within a clause. In English, for instance, the word order is SVO (Subject, Verb, Object); we know who does what to whom because of where they appear in the sentence. In "John hit Mary," we know who has hit whom because of the order; "Mary hit John" implies that something entirely different happened.
SVO and SOV (Subject, Object, Verb - "John Mary hit") are the most common word orders in the world's languages, followed by VSO. Word orders where the object precedes the subject - VOS, OSV, and OVS - are extremely rare in comparison.
Languages in which morphology plays a bigger role than syntax (typologically synthetic - polysynthetic, fusional or agglutinative rather than isolating) may have free word order. However many of these languages still have a preferred word order. In natural languages this preferred order is typically observed in subordinate clauses.
Other word ordering rules
Besides the arguments, there are usually other words in sentences, including demonstratives, adpositions, and optional modifiers such as adjectives and adverbs. Where these are positioned in the sentence reflects the language's headedness.
see also: Syntactic theory, Branching
There are two main methods of illustrating the syntax of a language or a sentence in writing. The first, the more intuitively comprehensible, is the syntax tree.
The second form of notation, which is much more succinct (it takes up a lot less space!) is called bracketing. The simplified tree of the sentence "John hit Mary" can be translated into the following bracketing notation (standard notation is written with square brackets):
(S (NP (N John)) (VP (V hit) (NP (N Mary))))
Each bracket must be closed. It is more difficult to read for most people.
Usage of syntax trees for conlangs
Syntax trees are largely used in the world of theoretical linguistics to try and examine, explain, and express how the mind organizes sentences. However it can also be useful to show the syntax properties of a particular language.
It is much easier to draw syntax trees by hand than any other means, but there are some free resources to enable tree-drawing, for example RSyntaxTree (which requires you to bracket a sentence, and then draws a tree for you).
Syntax trees can also be used to decompose morphological structure.