In most cases you won't - there isn't any visual warning, and unless thermal layers near the surface prevent the submarine's Sonar crew from hearing a close-aboard contact, a submarine already knows which surface contacts are around and is already tracking them while at Periscope Depth, which is the normal procedure prior to a normal surfacing. As such, it will only surface when it is a safe enough distance from those contacts to avoid any problems, as submarines are visually difficult to spot in the water, even during the daylight on the surface.
There are 2 methods of surfacing - a Low Pressure Blow, which uses an onboard high CFN blower while the boat is a Periscope Depth to draw air from the snorkel mast and force it slowly into the Main Ballast Tanks, and bringing it to the surface, or an Emergency Blow, which is only used in critical casualties where the boat needs to get to the surface as fast as possible. During an EB, high-pressure compressed air is dumped into the MBT's, and as the boat begins to rise, air expands in the tanks as sea pressure lessens, further increasing buoyancy. Once on the surface, the LPB, or if damaged, the Diesel Generator, are used to force any remaining water out of the MBT's.
If you're lucky enough to spot a submarine periscope (and most won't before it surfaces, as boats won't surface if there's a surface vessel within a certain range for marine safety considerations), and see white foam and bubbles coming from the sides of the hull, it's a good indication that the boat is surfacing using the LPB. Usually though, submarines tend to surface in areas where there aren't any surface contacts near enough to visually see them.
A submarine is a sea-going vessel, both on the surface and under the water.
A submarine can operate under water while other ships cannot, and a submarine can surface after going under water, while other ships can't.If everything is working correctly, a submarine can surface after sinking, while other ships cannot.
A submarine is a sea going vessel that is designed to run submerged or on the surface of the sea. Basically, by filling ballast tanks with sea water, the submarine will sink, and by blowing out the sea water from the ballast tanks with compressed air, the submarine will float on the surface.
A submarine is a ship that can travel underwater.
Royal Navy submarine
After you find the submarine you use dive up to the surface.
A submarine is kept at, or close to, surface air pressure.
A submarine can submerge by filling ballast and trimmer tanks with sea water. The additional weight will take the submarine down. To resurface, the submarine will blow the sea water out of the tanks using compressed air. The air in the tanks make the submarine buoyant, so it rises and floats on the surface. Though a stationary submarine can submerge in this way, it usually submerges going forward and using diving plane (fins) to steepen the dive, so getting under the surface faster.
Below the surface............
Enemy surface ships are the main target of submarine warfare
When a floating submarine submerges, it deliberately goes beneath the surface - which it is designed to do
Surfacing or broaching.