Complexity can be understood as a combination of variety and constraint. Variety is a measure for freedom or diversity, for the number of distinct possibilities or alternatives. Variety on its own leads to entropy, disorder and chaos.
Constraint is what limits possibilities, by excluding certain alternatives.
Constraint on its own engenders order, stability, rigidity. A system can be defined as a constraint on variety. Evolution is governed by the principle that fit systems are selected, where fitness measures the likeliness that the system will maintain and reproduce. Unfit systems are eliminated, i.e. undergo variation transforming them into a different, possibly more fit system. Thus evolution through natural selection tends to spontaneously create constraint or order.