Do submarines float?
Objects under water can float, rise or sink.
This is a Galileo-type thermometer:
Depending on the temperature of the fluid in which the sealed glass fluid containing sealed bubbles are suberged, they will either rise, sink, or float at certain levels. Per Wikipedia:
The only factor that determines whether a large object rises or falls in a particular liquid is the object's density relative to the density of the liquid. If the object is denser than the liquid then it sinks, as it is heavier than the liquid it displaces. If the object is less dense than the liquid then it begins to sink until the weight of the displaced liquid becomes equal to the object's weight; then it floats at that depth.
So, yes, a submarine floats at a certain depth in the ocean. If it is to surface, it rises, or it sinks to a lower depth. It works on Archimedes' principle:
Archimedes' principle is the law of buoyancy. It states that "any body partially or completely submerged in a fluid is buoyed up by a force equal to the weight of the fluid displaced by the body." The weight of an object acts downward, and the buoyant force provided by the displaced fluid acts upward. If these two forces are equal, the object floats. Density is defined as weight per volume. If the density of an object exceeds the density of water, the object will sink. - Office of Naval Research
I don't want to detract from medica's accurate answer, except to add another point of view about the word float and then discuss the jargon of submarine operations.
First, there is room for poetic license with the word float, to the point where these uses are as natural and accurate as the precise meaning you might be looking for.
Parachutes, paper airplanes, and wind dispersed seeds all float gently to the ground, the buoyant force and fluid dynamics not quite or not always balancing the weight.
A seagull floats, wings outstretched and motionless, on the air rising over a dune. (The bird is actually sinking through the air, but, since the air is rising, it appears to be floating.)
Astronauts float in space, where there is no fluid to float in.
In the world of modern naval submarines, they have their own jargon to be precise about what they do:
Resting motionless at a fixed depth is hovering (used when launching a missile).
Traveling at a fixed depth, ascending and descending while traveling is flying.
Going deeper in a controlled manner is diving.
Going deeper without control is sinking.
The OED has fifteen separate main meanings of the verb float, each with many sub-meanings. Only one of them, 3a, deals with an object floating on the surface of a liquid. Another (I think under '5') deals with the submarine situation. Yet others deal with such things as a parachute 'floating to the ground' i.e. floating whilst sinking.
If you are seriously interested in this the OED is worth a visit.
A submarine operates by changing its buoyancy. If the average density of the submarine is less than that of the surrounding water it floats on the surface. To dive the submarine increases its density by taking water into buoyancy tanks. When its overall density increases above that of the water it sinks.
Once the necessary depth has been reached the vessel will adjust for neutral buoyancy, where its density is the same as the surrounding water, and then the depth can be further controlled by the horizontal equivalent of a rudder.
So submarines can float, but they can also sink and "hover" at neutral buoyancy. This latter condition can't really be called floating.
Objects in liquids can have positive, negative or neutral buoyancy. At positive buoyancy they will float upwards, and negative buoyancy they will sink downwards, and at neutral buoyancy they will remain where they are.
A submerged submarine will be in these various states at various times. During the times it is at a steady depth it will have neutral buoyancy, and so can be said to be neither floating nor sinking.