The Allen-Cahn equation appears in the study of phase-transitions for a fluid with two-stable phases. It has been known from the work of Modica and Mortola that the level sets of the solution behave at large scales as minimal surfaces. This fact suggests that global solutions to the Allen-Cahn equation have the same rigidity properties as global minimal surfaces. In particular De Giorgi conjectured that the Bernstein theorem for minimal graphs is valid for the Allen-Cahn equation. I will discuss the history of this conjecture together with some of its nonlocal counterparts.