By using scanning Hall microscopy we visualize the progressive formation of the critical state with individual vortex resolution in a Pb thin film with a periodic pinning array. Slightly above the first penetration field, we directly observe a terraced critical state as proposed theoretically by Cooley and Grishin [Phys. Rev. Lett. 74, 2788 (1995)]. However, at higher fields, the flux front tends to disorder and the classical Bean profile is restored. This study allows us to establish a clear link between the widely used integrated response measurements in the superconducting state and the nanoscale landscape defined by individual vortices.