Wide Guard protects against specific moves, specifically moves which have more than one target such as Surf & Earthquake. In addition to protecting the user, it protects all of the user's allies in battle for that turn.
This effect doesn't just correspond to moves used by the opponent, but it also protects allies from damage from moves by other allies which would inadvertantly damage them, such as Surf which hits all neighbouring Pokémon.
There are a few moves however, that it doesn't protect against; Clear Smog, Haze & Perish Song
In Pokémon Ultra Sun & Ultra Moon, Wide Guard acts like Protect and reducdes damage from all Z-Moves by 75%, regardless of if they're multi-target moves.