The Leviathan (לויתן) is mentioned in the Hebrew Bible on only a handful of occasions—in the Books of Isaiah, Psalms, and Job—as a generic sea monster, as a way of demonstrating God’s power in being able to create such a creature and to ‘play’ with it as though it were a pet:
לויתן זה, יצרת לשחק בו (Psalms 104:26)
(‘there is that leviathan, whom thou hast made to play therein’)
The fact that most of the passages refer to the Leviathan only by name suggests that, like the word dragon in medieval and modern times, everyone ‘knew’ what it was, or what it looked like. Only the Book of Job goes into any descriptive detail, referring to God’s ability to ‘draw out leviathan with an hook’ (41:1), whose ‘teeth are terrible round about’ (41:14).
The biggest clue comes from Isaiah’s reference to the Leviathan by its full name—לויתן נחש בריח, ‘leviathan naḥash bariaḥ’, which is clearly related to ancient Ugaritic (northern Syria) לתן בת’ן ברח (latan bathan bariḥ): the Ugaritic word bathan is related to the Hebrew pethen (פתן) which is a type of snake.
From this it is apparent that the Leviathan is a sea reptile, rather than, say, a shark (which also has terrible teeth and can be fished out with a hook), or a whale (which is what leviathan means in modern Hebrew)—which is why English translations, such as the King James Version, translates this as ‘leviathan the piercing serpent.’
(Originally written in reply to a question at Quora.com).