After the destruction of the first temple in Jerusalem, Nebuchadnezer exiled the Jews from the land of Israel and many ended up in Persia, in the city of Shushan. According to many opinions the city is now called Hamadan, where the burial sites of Esther and Mordechai still exist and are visited by Jews every year on Purim till this day.
The leader of that time was someone by the name of Achashverosh. He was a dictator who had risen up militarily, but had taken a wife for himself of royal blood by the name of Vashti, in order to consolidate his power. Achashverosh throws a six month party to celebrate his third year in power and in a drunken state, has Vashti killed after she refuses to dance for him and his henchmen in her royal crown....only her royal crown.
Now single, Achashverosh begins the search for a new queen, and Esther, the niece of Mordechai, after much coaxing, takes the position.
Haman enters the scene, and as a descendant of King Agag, an Amalekite, he attempts to annihilate the Jewish people, particularly because of his annoyance at one Jew, Mordechai, who refuses to bow down to him!
Esther eventually reveals herself as a Jew, and the evil decree against the Jews is rescinded. Still some pockets of Jews are attacked and, whilst fasting for a redemption, win their battles. This is one reason why we fast on the 13th day of Adar.
In great celebrations for the incredible miracles performed on behalf of the Jews by Hashem, Esther and Mordechai establish that date every year for celebration, with four Mitzvot: sending food gifts to friends, giving charity to the poor, hearing the Megillah twice, once by night and one by day, and a festive meal eaten during the day.