Cavitation occurs widely in nature and engineering and is a complex problem with multiscale features in both time and space due to its associating violent oscillations. To understand the important but complicated phenomena and fluid mechanics behind cavitation, a great deal of effort has been invested in investigating the collapse of a single bubble near different boundaries. This review aims to cover recent developments in the collapse of single bubbles in the vicinity of complex boundaries, including single boundaries and two parallel boundaries, and open questions for future research are discussed. Microjets are the most prominent features of the non-spherical collapse of cavitation bubbles near boundaries and are directed toward rigid walls and away from free surfaces. Such a bubble generally splits, resulting in the formation of two axial jets directed opposite to each other under the constraints of an elastic boundary or two parallel boundaries. The liquid jet penetrates the bubble, impacts the boundary, and exerts a great deal of stress on any nearby boundary. This phenomenon can cause damage, such as the erosion of blades in hydraulic machinery, the rupture of human blood vessels, and underwater explosions, but can also be exploited for applications, such as needle-free injection, drug and gene delivery, surface cleaning, and printing. Many fascinating developments related to these topics are presented and summarized in this review. Finally, three directions are proposed that seem particularly fruitful for future research on the interaction of cavitation bubbles and boundaries.