Perseus and his mother, Danaë, make their home on an island after being thrown into the ocean by Acrisius, Danaë's father. Polydectes, the ruler of the island, fell in love with Danaë, and tried to force her to become his consort. Danae didn't want to marry Polydectes, and relied on Perseus to save her.
Perseus wanted to stop this marriage, so Polydectes decided he had to get rid of him. Perseus couldn't afford a wedding gift for the two, so Polydectes asked him to bring him back the head of Medusa instead. This was part of Polydectes' plan to get rid of Perseus.
Perseus knew this was an impossible task to accomplish on his own. He was hesitant on whether or not to go. He didn't know where to find Medusa, let alone how he would slay her, but he knew he had to save his mother.