When something moves at high speed (with respect to the viewer), the effects of relativity make its length contract. From the point of view of someone sitting on the sea floor, that makes the submarine more dense than the water around it, and so it sinks. Then again, from the point of view of the submariners, the submarine stays still while the water flows by it. The water contracts, getting denser, and the submarine floats upwards.