Polydectes wanted to marry Perseus' mother, Danae but wanted nothing to do with Perseus. He tricked Perseus into taking on a deathly mission- bringing the head of Medusa , a monster, to him.
Perseus received weapons from Athena and Hermes to help- winged sandals to make him fly, a cape to make him invisible, a sword and a mirrored shield so he wouldn't be petrified.
Perseus embarks on the 7 day journey to the end of the world, and first meets the 3 Grey sisters. He asks where the Gorgon live but they don't tell him, until Perseus takes their eye and threatens to through it into the sea.
Perseus meets the nymphs and asks them where to find the Gorgons. They tell him to go to Atlas the giant. He then finds Medusa's location and makes his way.
He finally finds Medusa and is able to behead her after almost being petrified. He then takes the head and returns back to Polydectes.
When Perseus returns with the head, Polydectes is angry at this but Perseus uses Medusa's head to petrify him, saving his mother from an unwanted marriage.