Metamaterials are an artificial electromagnetic material composed of periodic/non-periodic subwavelength micro-/nanostructures, i.e. meta-atoms. The meta-atom interacts with the incident electromagnetic wave and introduces electromagnetic resonance, which makes the metamaterial exhibit the desired electromagnetic characteristics. Therefore, the electromagnetic wave can be controlled by changing the geometry, configuration and distribution of the meta-atoms. Due to their flexible electromagnetic manipulation ability, metamaterials have attracted great interest in many fields, such as super-resolution imaging, high-sensitive detection, aerocraft stealth and laser-machining. A planar metamaterial with one or a few layers of meta-atoms is called a metasurface. The metasurface can not only manipulate the amplitude, phase and polarization of the electromagnetic waves, but also has the advantages of being ultra-thin, ultra-light and easy to process. In the terahertz (THz) region, more and more devices based on metasurfaces have been proposed for spectrum modulation and wavefront shaping, which has contributed to the rapid development of THz technology. This paper reviews the design principles and research progress of metamaterials/metasurfaces for spectrum modulation, wavefront shaping, polarization conversion and surface wave manipulation in the THz region. Active metamaterials can be used to manipulate electromagnetic waves dynamically, and this will become a research field with great application potential. In this review, the implementation schemes and research results of various active THz metamaterial devices are reviewed in detail. Furthermore, the potential applications of metamaterials/metasurfaces in security, high-capacity communication, biomedicine and other fields are analyzed. Finally, we discuss the future developments and challenges of THz metamaterials.