Invariant manifold theory and its applications to nonlinear partial differential equations