Snare spell: when do creatures get an Intelligence Check to spot it?


The description of the snare spell says the trap it creates is near invisible, but can be discerned:

This trap is nearly invisible, requiring a successful Intelligence (Investigation) check against your spell save DC to be discerned.

I’m not sure under which conditions the check can be attempted. Does anyone passing near the trap gets an automatic investigation check to spot it? Or maybe it requires spending an action explicitly looking for traps?