Summary:

Like land units, there are military and non-military naval units, as well as ranged, and melee naval units. Work boats are destroyed when attacked by barbarians and other civs or city-states, and any "embarked" land units are weak, although they can absorb a hit or two.

Ranged naval combat units may attack other naval units and any land units within range that they can see.

Melee naval combat units may directly attack other naval units, as well as coastal cities. There are however certain late-era naval units that merit special attention: the carrier, missile cruiser and the submarines. For more detail, you can view these units by clicking the "Units" tab in the Civilopedia.