The dynamics of a nonlinear wave equation