Watering hole attacks involve compromising websites that are frequently visited by a specific group of users. The attackers inject malicious code into these sites, which then infects the visitors' devices.