From the very first submarine until the end of World War Two all submarines were basically surface ships that had the ability to submerge when they had too. They spent most of their time on the surface, and they were faster on the surface than submerged. Sometimes as much as four times faster on the surface. Well, until 19 April 1944 that is.
They had many of the things they would need permanently mounted on the hull. Deck guns, machine guns, anti-aircraft guns, handrails, cleats, chocks, and many other things. This equipment protruded from the hull slowing down the sub and creating flow noise. The flow noise from water rushing around these objects while submerged made the submarine louder.
Then came the Type XXI German U-boat. Not only did the Type XXI have a streamlined hull, but it had a snorkel and many other unique features. Features which are now standard on all submarines world wide. And as if that was not enough, for the first time a submarine could travel faster submerged than surfaced. The Type XXI U-boat could travel three to five times faster submerged than any other submerged submarine. It was the first sub designed to spend most of its time submerged. It was truly the first modern submarine, and was heavily copied by all the allies after World War Two.