They’re revealed if they affect the stones you place.
If you play on top of opponent’s stone, it’s revealed, because it would be illegal move, and you’re shown opponent’s stone there. You get to play elsewhere, you don’t lose move.
If your stones are taken, you’re shown which ones, and, naturally, it reveals opponent’s stones that completely surrounded your taken stones.
There can be some other edge cases, like if you play suicide move, that’s illegal too. So opponent’s stones making it suicidal would be revealed too, I guess.
You can have house rules. E.g. on Variant Go Server, if you play atari, stones are already revealed.
On Variant Go Server you’re told if opponent revealed your stone. But since this one is in person they don’t know which of their stones are revealed to opponent, although they can hear the fact of it.