Using the reflection in the shield to guide his hand, Perseus swung Hermes' sickle at her, killing her.
With Medusa dead, Perseus had to run from her two sisters, the other Gorgons.
Perseus escaped the two Gorgons, who went back to their cave crying over the loss of their sister.
Perseus returned, and now seeing why Polydectes sent him, killed Polydectes.
You weren't supposed to come back!
The understanding that the Greeks hoped to gain from this story was how manipulating others around oneself would eventually backfire. Polydectes tried to send Perseus to his death to court his mother, and when Perseus succeeded, Polydectes was killed.