We know that $F = -\frac{dU}{dx}$, so if $dU$ is $0$, then $F=0$, meaning equilibrium. Thus, if you consider a displacement of $dx$ to the system, and calculate the corresponding $dU$, we can solve the problem by setting $dU$ to $0$. A couple notes:
- All possible displacements $dx$ must be considered
- Best applied when a system is constrained and forces are complicated, but motion is not.