Yam ("Sea") is the Ugaritic god of the sea and the rivers — the chaos-power of the untamed waters, who demands tribute from the gods' council and is defeated by Baal with the craftsman-god's forged weapons: the Levant's telling of the storm-god-versus-sea war that runs from Babylon to the Bible's Leviathan.
The sea, the river, the seven-headed serpents of his court
Cult Centers
The sea itself; no cult-place recorded
Origins & Attestation
The Baal Cycle's first tables stage his reign: El's court concedes to the sea's demand for tribute until Baal breaks him — the texts name him Judge Nahar, "River, the judge."
His name's kin (yam, sea) is the common noun — the sea itself standing up as a god.
Myths
The tribute demand: the sea's envoy demands the gods' submission and the tribute of Baal's servants; El the father inclines to yield — the sea's legitimate terror.
The two battles: Kothar-wa-Hasis forges the two clubs ("Driver" and "Chaser," by name) and Baal smites Yam — the storm beating the sea to its bounds; the sea's seven-headed serpent-court the mythic image the Hebrew Bible's Leviathan answers — and Mot the death who follows him in the cycle's next tablets.
Worship & Cult
No temple to the sea's terror — the rites that address him are the calmings and the boundary-keeping; the Ugarit lists rank him among the gods without a following.
Iconography
The sea itself, and the many-headed serpents — chaos's iconography, not a shaped god.
Parallels
The sea-vs-storm war is the Near East's shared myth — Tiamat's Babylonian body, Teshub's Illuyanka, the Hebrew Leviathan and Rahab; the Dragon Kings domesticated what Yam kept wild.