From: Matthew 2:13-15, 19-23
The Flight Into Egypt
 Now when they (the Magi) had departed, behold, an angel of the Lord appeared to Joseph in a dream and said, "Rise, take the Child and His mother, and flee to Egypt, and remain there till I tell you; for Herod is about to search for the Child, to destroy Him."  And he rose and took the Child and His mother by night, and departed to Egypt, and remained there until the death of Herod. This was to fulfill what the Lord had spoken by the prophet, "Out of Egypt have I called My Son."
The Return to Nazareth
 But when Herod died, behold, an angel of the Lord appeared in a dream to Joseph in Egypt, saying,  "Rise, take the child and his mother, and go to the land of Israel, for those who sought the child's life are dead."  And he rose and took the child and his mother, and went to the land of Israel.  But when he heard that Archelaus reigned over Judea in place of his father Herod, he was afraid to go there, and being warned in a dream he withdrew to the district of Galilee.  And he went and dwelt in a city called Nazareth, that what was spoken by the prophets might be fulfilled, "He shall be called a Nazarene."
14. St. John Chrysostom, commenting on this passage, draws a particular attention to Joseph's faithfulness and obedience: "On hearing this, Joseph was not scandalized, nor did he say, 'This is hard to understand. You yourself told me not long ago that He would save His people, and not He is not able to save even Himself. Indeed, we have to flee and undertake a journey and be away for a long time...'. But he does not say any of these things, because Joseph is a faithful man. Neither does he ask when they will be coming back, even though the angel had left it open when he said 'and remain there till I tell you.' This does not hold him back: on the contrary, he obeys, believes and endures all trials with joy" ("Hom. on St. Matthew", 8).
It is worth noting also how God's way of dealing with His chosen ones contains light and shade: they have to put up with intense sufferings side by side with great joy: "It can be clearly seen that God, who is full of love for man, mixes pleasant things with unpleasant ones, as He did with all the Saints. He gives us neither dangers nor consolations in a continual way, but rather He makes the lives of the just a mixture of both. This was what He did with Joseph" (ibid.).
15. The text of Hosea 11:1 speaks of a child who comes out of Egypt and is a son of God. This refers in the first place to the people of Israel whom God brought out of Egypt under Moses' leadership. But this event was a symbol or prefiguration of Jesus, the Head of the Church, the New People of God. It is in Him that this prophecy is principally fulfilled. The sacred text gives a quotation from the Old Testament in the light of its fulfillment in Jesus Christ. The Old Testament achieves its full meaning in Christ, and, in the words of St. Paul, to read it without keeping in mind
22. History tells us that Archelaus was ambitious and cruel like his father. By the time Joseph returned from Egypt, the new king was quite notorious.
"In the different circumstances of his life, St. Joseph never refuses to think, never neglects his responsibilities. On the contrary, he puts his human experience at the service of faith. When he returns from Egypt, learning 'that Archelaus reigned over Judea in place of his father Herod, he was afraid to go there.' In other words, he had learned to work within the Divine Plan. And to confirm that he was doing the right thing, Joseph received an instruction to return to Galilee" St. J. Escriva, "Christ Is Passing By", 42).
23. Nazareth, where the Annunciation had taken place (Luke 1:26), was a tiny and insignificant Palestinian village. It was located in Galilee, the most northerly part of the country. The term "Nazarene" refers to Jesus' geographic origin, but His critics used it as term of abuse when He began His mission (John 1:46). Even in the time of St. Paul the Jews tried to humiliate the Christians by calling them Nazarenes (Acts 24:5). Many prophets predicted that the Messiah would suffer poverty and contempt (Isaiah 52:2ff.; Jeremiah 11:19; Psalm 22), but the words "He shall be called a Nazarene" are not to be found as such in any prophetic text. They are, as St. Jerome points out, a summary of the prophets' teaching in a short and expressive phrase.
However, St. Jerome himself (cf. "Comm. on Isaiah", 11:1) says that the name "Nazarene" fulfills the prophecy of Isaiah 11:1: Christ is the "shoot" "nezer", in Hebrew) of the entire race of Abraham and David.
Source: "The Navarre Bible: Text and Commentaries". Biblical text taken from the Revised Standard Version and New Vulgate. Commentaries made by members of the Faculty of Theology of the University of Navarre, Spain. Published by Four Courts Press, Kill Lane, Blackrock, Co. Dublin, Ireland. Reprinted with permission from Four Courts Press and Scepter Publishers, the U.S. publisher.