Water covers 71% of the Earth's surface, where the steady increase in oceanic activities has promoted the need for reliable maritime communication technologies. The existing maritime communication systems involve terrestrial, aerial, and space networks. This paper presents a holistic overview of the different forms of maritime communications and provides the latest advances in various marine technologies. The paper first introduces the different techniques used for maritime communications over the radio frequency (RF) and optical bands. Then, we present the channel models for RF and optical bands, modulation and coding schemes, coverage and capacity, and radio resource management in maritime communications. After that, the paper presents some emerging use cases of maritime networks, such as the Internet of Ships and the ship-to-underwater Internet of things. Finally, we highlight a few exciting open challenges and identify a set of future research directions for maritime communication, including bringing broadband connectivity to the deep sea, using terahertz and visible light signals for on-board applications, and data-driven modeling for radio and optical marine propagation.