This type of problems is known as obstacle problems. They impose an inequality in addition to a differential equation; the equation is required to hold only in the region where the inequality is strict (the free region). One can visualize the situation by imagining that the differential equation is trying to stretch the graph of $u$ to give it a certain form, but there is an obstacle in the way.
In your example, the ODE requires the function to be linear in the free region. Clearly it can't be linear everywhere, because with the zero boundary conditions we would have $u\equiv 0$, violating the obstacle condition. So there is a set, call it $A$, where $u$ meets the obstacle:
$$
A = \{x:u(x)=1-2x^2\}
$$
The set $A$ is closed, so its complement $B$ can be written as a disjoint collection of open intervals. On each such interval, $u$ is linear and strictly above the parabola. At the ends of the interval, it meets the parabola. But... since the parabola is strictly concave, it is impossible for a line segment to meet it at the ends and stay above it. So the only components that $B$ has are one-sided: those of the form $[-1,x_1)$ and $(x_2,1]$. (The fact that $1,-1\in B$ follows from the boundary conditions.)
Since $u$ is $C^1$, the slope of the line segment from the point $(-1,0)$ to $(x_1, 1-2x_1^2)$ must be equal to the derivative $-4x_1$. This leads to $x_1=2^{-1/2}-1$, as Ian found in a comment. Similarly (or by symmetry), $x_2=1-2^{-1/2}$. It remains to write down the solution, which is linear on $[-1,x_1]$, follows the parabola on $[x_1,x_2]$, and is linear again on $[x_2,1]$.