The wise men were also known as Magi or kings from the East.
It is not clear where they came from exactly - the Bible just says from the east. Some believe they came from Persia (modern day Iran), others from Arabia and others Babylon, since they were noted astronomers.
The Bible is clear that three different gifts were brought to Jesus, but it never says there were only three wise men. It is possible that there were many more.
As with the other stories around Jesus' birth, an angel is key to this story. An angel appeared to Joseph to warn him that they were not safe in Israel because of King Herod. Because of this dream, Joseph, Mary, and Jesus fled to Egypt.
Herod became enraged that he had been tricked by the wise men, and ordered that all baby boys under 2 years old be killed (this is why it is commonly accepted that Jesus was between 1 and 2 years old when the wise men visited, not in the manger scene).
After some time, an angel appeared to Joseph to tell him that it was safe to return to Israel, and then again to Nazareth.
Notice the parallels and contrasts in this story and the story of the Israelite exodus from Egypt:
- In the Old Testament, Jacob's family went to Egypt to escape a famine. In the New Testament, Joseph led his family to Egypt to escape King Herod.
- In the Old Testament, all the firstborn sons and animals in Egypt were killed in the last plague. Only the Israelite boys were spared. In the New Testament, all the baby boys around Bethlehem were killed due to King Herod's jealousy. Jesus was spared.
- In the Old Testament, the Israelites stayed in Egypt for hundreds of years. In the New Testament, Joseph's family only stayed in Egypt for a couple years (it is not specified, but it is not long)
- In the Old Testament, Moses led his people through the desert for 40 years before Joshua led them into the promised land - a journey that took over 40 years. In the New Testament, Joseph led his family back into Israel - a journey that did not take very long.