Under the water you've got sonar, which only tells you sound (and sound pressure levels) from a particular bearing.
If you're up at periscope depth you can stick a periscope up to see and other antennas. If you're on the surface you typically send people up into the sail and the boat is commanded from there. (Only a couple people fit up there, so the people actually operating the rudder and navigating are belowdecks).
Overall you generally get a good indication of what's happening, but... it's definitely possible to be surprised.