Danae was locked away by her father because of an oracle reading saying that her son would kill him
After being locked up, Danae was visited by Zeus who impregnated her and when her father found out he sent her and her son Perseus to sea in a chest. They later washed up onto an island and were taken in by a fisherman and his wife.
King Polydectes, the king of the island that Perseus and Danae had washed up on, took a liking to Danae and wanted her hand in marriage. Polydectes tricked Perseus into promising to bring back the head of Medusa. It was an impossible task that would almost certainly get Perseus killed.
Reluctant to leave his mother, Perseus sets off on his journey guided by Athena and Hermes. They guided him to finding the hesperides who give him a bag that lets him safely carry Medusa's head. He also received many gifts and knowledge from the gods.
Perseus found Medea and beheaded her. After acquiring Medusa's head, Perseus flies back home and rescues Andromeda, a princess, from a sea dragon.
When Perseus came home, he confronted King Polydectes who has been trying to force Danae to marry him. Perseus kills the King by using Medea's head to turn him into stone.
Perseus returned home, married to Andromeda, and then competed in an athletic competition and accidently hit a spectator that just so happend to be his father and the oracle was fufilled.