The account is in Matthew 2:13-15 (NASB):
Now when they had gone, behold, an angel of the Lord *appeared to Joseph in a dream and said, "Get up! Take the Child and His mother and flee to Egypt, and remain there until I tell you; for Herod is going to search for the Child to destroy Him."So Joseph got up and took the Child and His mother while it was still night, and left for Egypt.
He remained there until the death of Herod. This was to fulfill what had been spoken by the Lord through the prophet: "OUT OF EGYPT I CALLED MY SON."
A contemporary of Martin Luther, a German artist/engraver by the name of Albrecht Durer, engraved with interesting detail the story of their flight into Egypt. The halo surrounding Mary and the baby Jesus are very typical for Renaissance art, but Joseph looks very common. Joseph walks, Mary rides on the donkey with Jesus in her arms...and a bit of wind is blowing her scarf back. It's an interesting piece to reflect on this journey that they undertake so soon after Jesus' birth.
The story in scripture seems to carry us immediately into the life of Jesus. His life is not going to be one of a "King" of royalty who will be served, who will have what he wants when he wants it - the kind of life I often dream "wouldn't it be nice if only...." His life begins with a flight and emphasizes the danger of living. It is not going to be easy, it is filled with spiritual warfare - visible and invisible. It is a reminder that we are to "watch", "be alert", be "awake" all around us for we have (as Luther so eloquently reminded) "one who seeks to do us harm."