God's special people, the Jews, did not obey God. So he punished them. He allowed the king of Babylon and his army to defeat them. The king of Babylon ordered most Jews to live in Babylon. Babylon was a long way from their own country, called Judah.
Many years later, the army from Persia defeated the army from Babylon. The book of Ezra in the Bible tells us that the king of Persia allowed the Jews to return to their own land. Not all the Jews returned to Judah, but some did return.
The Jews started to build a temple (house of God) in Jerusalem. But the people who lived near them did not want the Jews back in the land. They opposed the Jews so that the Jews did not continue to build the temple. Many years later, God helped the Jews and they finished the building.
Many years after that, Ezra led another group of Jews who returned to Judah. Ezra was a teacher who taught the people from God's word. God sent Ezra to teach the people so that they would become God's special people again. Often the people did not obey God's word, but Ezra continued to teach them. He told them how to live in a way that would please God.