The definition of category ensures that you can _always_ "compose" two arrows if one's target is the other's source: that is, every diagram
$$ \begin{matrix} X & \xrightarrow{f} & Y \\\ & & \downarrow g\\!\\!\\!\\!\\! \\\ & & Z \end{matrix}$$
can be (uniquely!) completed to a commutative diagram
$$ \begin{matrix} X & \xrightarrow{f} & Y \\\ &\\!\\!{}_{gf\\!\\!\\!}\searrow & \downarrow g\\!\\!\\!\\!\\! \\\ & & Z \end{matrix}$$
However, it is **not** true that every diagram
$$ \begin{matrix} X & \xrightarrow{f} & Y \\\ &\\!\\!{}_{h\\!\\!\\!}\searrow & \downarrow g\\!\\!\\!\\!\\! \\\ & & Z \end{matrix}$$
commutes; in many categories, you can have $h \
eq gf$ in such a diagram.
* * *
Preorders are a special case; they can be defined as categories with the weird property that _every_ diagram is commutative; e.g. in a preorder, whenever you have the third triangle above, you have to have $h = gf$