Millimeter-wave and terahertz frequency bands are receiving more and more attention due to their big potentials for widespread applications such as in high-speed communications and high-resolution imaging. Nevertheless, limited by the functional materials and devices in these bands, we face lots of challenges towards high efficiency, high precision, and multi-domain electromagnetic manipulations that are urgently required in the practical application scenarios. The emergence of metasurfaces, especially the digital coding metasurfaces and programmable metasurfaces, has provided powerful capabilities to control electromagnetic waves. Recently, with the progress of space-domain, time-domain, space-time-domain, and polarization-domain programmable metasurfaces, considerable new applications have been achieved, including new-architecture wireless communication transmitters, the integration of sensing and communications, simultaneous information and power transfers, and information encryption. Consequently, integrated multifunctional platforms based on metasurfaces are expected. In this review, the recent advances in millimeter-wave and terahertz programmable metasurfaces are thoroughly presented, including the design principles and methods, the applications in the nextgeneration wireless communication systems, the integrated sensing and communications, and other multifunctional systems. (c) 2024 The Authors. Published by Elsevier B.V. on behalf of The Chinese Ceramic Society. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).