Dynamics of self-trapping in the discrete nonlinear Schrödinger equation