His mother Danae was locked in a prison by her own father, King Acrisius of Argos. The King had been told that his daughter's son would one day kill him. Instead of taking the risk that his daughter would become pregnant, he locked her away in a tower with no doors, and only one small window. Zeus turned himself into a shower of gold and slipped through the window. He turned the prison into a lovely meadow filled with sun. Danae's father saw light coming from the window and demanded that a wall be torn down so he could check on his daughter.
When the wall came down Danae could be seen holding a baby boy. Mother and child were put in a chest and shoved into the ocean with the hopes that they would perish. They washed up on the shore of an island and were greeted by Dictys (a fisherman). Perseus grew up quite happily until one day King Polydectes decided he wanted to marry Perseus' mother.
Danae was not interested in marrying the king, however he wasn't taking no for an answer, but she had Perseus to protect her. The King couldn't get around Perseus, so instead he pretended to marry someone else. When Perseus came to the wedding without a gift (he couldn't afford one) the King demanded Perseus bring him Medusa's head as a gift.
Perseus went on a long quest, ended up slaying Medusa (the Gorgon) and on his way back to the king, uses the head to free Princess Andromeda, accidentally kills his grandfather (which means the prophecy did come true despite the old kings efforts), takes the head back to King Polydectes only to find out the wedding was a sham and that his mother has been forced to be the King's servant. Perseus was so upset by this that he used Medusa's head to turn his enemies in the Kingdom to stone, thereby rescuing his mother.
Much much later Perseus and Andromeda are placed into the sky as constellations.