King Acrisius is told by the oracle Delphi that his grandson is cursed. He forces his daughter Danae and her infant son, Perseus into a large wooden chest which he cast into the ocean
Ha! That'll show Polydektes
With help from Poseidon and Zeus, Perseus and Danae land safely on the island Seriphos. Danae catches the eye of the King, Polydectes and is wished into his court. Perseus becomes an obastacle for the king because he does nto wish Polydectes for his mother. Polydectes sends Perseus to slay Medusa hoping that he would be killed.
The gods/goddess Athena, Hermes and Hades gifted perseus the three objects he needed to be successful on his quest. Hermes gave him winged sandals for flight to Medusa's hidden lair. Athena gave Perseus her shiny shield in order for him to see without looking directly at Medusa. And Hades gave him his invisibility helmet to sneak in unseen.
After learning the location of her lair Perseus sneaks in while Medusa is sleeping and decapitates her. From her blood the winged horse Pegasus and his brother Chrysaor is born as Medusa was pregnant with poseidon at the time.
After his success Perseus returned to Seriphos and forced Polydectes to look into Medusa's eyes, turning him to stone. He freed his mother from the king's clutches and returned home to Argos, seizing power over King Acrisius. The head of Medusa was gifted to Athena as a gift of thanks. She mounted it on her shield so enemies would turn to stone in battle.
At a King's funeral ceremony Perseus accidentally killed his grandfather, Acrisius. with a discus throw gone awry. Thus for filling the prophecy once and for all.