The history of the submarine goes back to antiquity. Humanity has employed a variety of methods to travel underwater for exploration, recreation, research and significantly, warfare. While early attempts, such as those by Alexander the Great, were rudimentary, the advent of new propulsion systems, fuels, and sonar, propelled an increase in submarine technology. The introduction of the diesel engine, then the nuclear submarine, saw great expansion in submarine use — and specifically military use — during World War I, World War II, and the Cold War. The Second World War use of the U-Boat by the Kriegsmarine against the Royal Navy and commercial shipping, and the Cold War's use of submarines by the United States and Russia, helped solidify the submarine's place in popular culture. The latter conflicts also saw an increasing role for the military submarine as a tool of subterfuge, hidden warfare, and nuclear deterrent. The military use of submarines continues to this day, predominantly by North Korea, China, the United States and Russia.
Beyond their use in warfare, submarines continue to have recreational and scientific uses. They are heavily employed in the exploration of the sea bed, and the deepest places of the ocean floor. They are used extensively in search and rescue operations for other submarines, surface vessels, and air craft, and offer a means to descend vast depths beyond the reach of scuba diving for both exploration and recreation. They remain a focus of popular culture and the subject of numerous books and films.