Electromagnetic metamaterials are artificial structures engineered on a subwavelength scale to have optical properties that are not observed in their constituent materials and may not be found in nature either, such as negative refractive index. They have enabled unprecedented flexibility in manipulating light waves and producing various novel optical functionalities. Since the beginning of this century, with the development of nanofabrication and characterization technologies, there has been aroused a tremendous growing interest in the study of electromagnetic metamaterials and their potential applications in different fields including super-resolution imaging, optical biosensing, electromagnetic cloaking, photonic circuits and data storage. Electromagnetic metasurfaces are two-dimensional metamaterials composed of subwavelength planar building blocks. Although metasurfaces sacrifice some functionalities compared with their bulk counterparts, they provide us with distinct possibility to fully control light wave with ultrathin planar structures. Based on Huygens principle, the metasurfaces are able to arbitrarily manipulate the phases, amplitudes or polarizations of optical waves. For example, metasurfaces made of gold nanoantenna-arrays are able to create phase discontinuities for light propagating through the interfaces and drastically change the flows of reflected and refracted light at infrared frequencies. Comparing traditional dielectric optic elements, the thickness values of metasurface-based optical devices are much smaller. In addition to the control of free-space incident light, metasurfaces can also be used to precisely control and manipulate surface electromagnetic waves. In this review, we introduce the generalized Snell's law and the fundamental principles to modulate phase by using metasurfaces. Research progress of a variety of imaging technologies based on metasurfaces is then presented, including plasmonic metasurface, all-dielectric metasurface and metal/insulator hybrid metasurface. Finally, we summarize several frontier problems associated with metasurface, which maybe provide some references for the future researches and applications.