Naval warfare is combat in and on the sea, the ocean, or any other battlespace involving a major body of water such as a large lake or wide river. Battles have been fought on water for more than 3,000 years.
The armed forces branch designated for naval warfare is a navy. Naval operations can be broadly divided between riverine and littoral applications (brown-water navy), open-ocean applications (blue-water navy), and something in between (green-water navy), although these distinctions are more about strategic scope than tactical or operational division. The strategic offensive purpose of naval warfare is projection of force by water, and its strategic defensive purpose is to frustrate the similar projection of force by enemies.
Man has fought battles on the sea for more than 3,000 years. Even in the interior of large landmasses, transportation before the advent of extensive railways was largely dependent upon rivers, canals, and other navigable waterways.
The latter were crucial in the development of the modern world in the United Kingdom, America, the Low Countries and northern Germany, because they enabled the bulk movement of goods and raw material, which supported the nascent Industrial Revolution. Prior to 1750, materials largely moved by river barge or sea vessels. Thus armies, with their exorbitant needs for food, ammunition and fodder, were tied to the river valleys throughout the ages.
Pre-recorded history (Homeric Legends, e.g. Troy), and classical works such as The Odyssey emphasize the sea. The Persian Empire – united and strong – could not prevail against the might of the Athenian fleet combined with that of lesser city states in several attempts to conquer the Greek city states. Phoenicia's and Egypt's power, Carthage's and even Rome's largely depended upon control of the seas.
So too did the Venetian Republic dominate Italy's city states, thwart the Ottoman Empire, and dominate commerce on the Silk Road and the Mediterranean in general for centuries.