Esther (named for the goddess, Ashtar) was a Persian Jew who was orphaned at a young age. The Israelites had been exiled to Babylonia in 586 B.C.E. and still remained there. Esther's cousin, Mordecai, was older than she and he raised Esther. Esther was still a young woman when her presence was requested at the palace of King Ahasuerus.
Ahasuerus had recently "disposed of" his wife, Queen Vashti. Vashti had displeased the king by refusing to strip down for his guests. Ahasuerus needed a new wife and he called upon all of the virgins in Persia to present themselves at the palace.
Esther was an extremely beautiful woman and Ahasuerus chose her to be his queen. Esther moved away from her Jewish community and into the palace. Mordecai advised her not to admit to her Jewish heritage because he was unsure of the king's sentiments towards the Jews.
Meanwhile, Haman, an anti-Semitic advisor to the king, was plotting a day of execution for all of the Jews in Persia. He brought his proposal to King Ahasuerus and the king signed it, without realizing that his own bride would be affected by this mass slaughter.
Esther did not know about his agreement between Ahasuerus and Haman, but Mordecai came to the palace to inform her. He demanded that she speak to the king and beg him to revoke the decree. Esther knew that no one, not even the queen, could approach the king without first being called. Fearing for her own life, she told Mordecai that she wanted to simply stay out of the entire ordeal.
Mordecai explained to his cousin that when the 14th of Adar came upon them, even she, the queen, would not be spared. Esther quickly changed her mind and called upon the king to come to a dinner with herself and Haman. Luckily, Ahasuerus cared very much for his new queen, and was receptive of Esther's invitation.
When she, Haman, and Ahasuerus sat down to their meal, Esther began to plead with the king not to kill his own queen. Ahasuerus, of course, was very surprised by Esther's outburst. Esther revealed Haman's plan in its entirety, and then admitted to her own past as a Jew from Shushan. Ahasuerus, a proud (and rather hot-tempered) king, decided to hang Haman for treason and for threatening the life of his queen. Haman and his ten sons hanged on the 14th of Adar, the day set for the execution of the Jews.
Sources: Telushkin, Joseph. Biblical Literacy: The Most Important People, Events, and Ideas of the Hebrew Bible. NY: William Morrow and Co., 1997.