What defines negative and non-negative type operators?
I can explain the mathematical background. Suppose we have a type operator $F$ that takes a type $A$ to a type $F(A)$, and we want to extend it so that it also maps functions. It should take a function $f : A \to B$ to a function $F(f) : F(A) \to F(B)$. This can often be done, for example if
$$F(X) = X + (C \to X)$$
for a fixed $C$, then we may define
$$F(f) : A + (C \to A) \to B + (C \to B)$$
in a natural way as
\begin{align*}
F(f)(\mathtt{inl}(a)) &amp;= \mathtt{inl}(f(a)) \\
F(f)(\mathtt{inr}(g)) &amp;= \mathtt{inr}(f \circ g)
\end{align*}
We say that $F$ acts covariantly on functions.

But sometimes the direction gets reversed! Consider
$$F(X) = X \to C$$
for a fixed type $C$. Then $f : A \to B$ can be mapped to
$$F(f) : (B \to C) \to (B \to A)$$
by
$$F(f) = \lambda g . g \circ f.$$
This time the direction was reversed. We say that $F$ acts contravariantly on functions.

In some cases we are stuck, for instance if $F$ mixes things up. An example would be $F(X) = X + (X \to C)$.

If $F$ takes several arguments it may act covariantly on some of them and contravariantly on others.

Covariance and contravariance are important mathematical concepts which show up in many places: category theory, physics, analysis, you name it.

The positive and negative occurrences of a type variable in a type expression tell you whether the corresponding type constructor acts covariantly (positive) or contravariantly (negative) in that position.

For example, in $F(X) = (X \to C) \to C$ we have a positive occurrence of $X$, and indeed $F$ acts on $f : A \to B$ covariantly to give $F(f) : F(A) \to F(B)$ defined by
$$F(f) = \lambda \phi : (A \to C) \to C . \lambda g : B \to C . \phi(g \circ f).$$