Ovid tells the story in "Metamorphoses". Book 6, 5-54, 129-145. The story is typical of tragedy in Ancient Greek theatre, where pride in thinking oneself better than the gods – "ὕβρις" (hubris) – brings punishment from the gods.