Metamaterials are composed of periodic subwavelength metal/dielectric structures that resonantly couple to the electric and/or magnetic components of the incident electromagnetic fields, exhibiting properties that are not found in nature. Planar metamaterials with subwavelength thickness, or metasurfaces, consisting of single-layer or few-layer stacks of planar structures, can be readily fabricated using lithography and nanoprinting methods, and the ultrathin thickness in the wave propagation direction can greatly suppress the undesirable losses. Metasurfaces enable a spatially varying optical response, mold optical wavefronts into shapes that can be designed at will, and facilitate the integration of functional materials to accomplish active control and greatly enhanced nonlinear response. This paper reviews recent progress in the physics of metasurfaces operating at wavelengths ranging from microwave to visible. We provide an overview of key metasurface concepts such as anomalous reflection and refraction, and introduce metasurfaces based on the Pancharatnam-Berry phase and Huygens' metasurfaces, as well as their use in wavefront shaping and beam forming applications, followed by a discussion of polarization conversion in few-layer metasurfaces and their related properties. An overview of dielectric metasurfaces reveals their ability to realize unique functionalities coupled with Mie resonances and their low ohmic losses. We also describe metasurfaces for wave guidance and radiation control, as well as active and nonlinear metasurfaces. Finally, we conclude by providing our opinions of opportunities and challenges in this rapidly developing research field.