You're referring to the violent action that Herod, who was king over that part of the world, took after he learned about Jesus' birth. Knowing only that Jesus had been born in the small town of Bethlehem, he ordered the slaughter of every boy living there below the age of two.
But God delivered Jesus and His family by warning Mary's husband, Joseph, about Herod's plans in a dream, and they hurriedly fled to Egypt. (The wise men, who'd come from a distant country and innocently told Herod about the birth of the Messiah, likewise were warned to flee.) Mary, Joseph and Jesus only returned from Egypt after Herod's death, settling in Nazareth, the town that would become Jesus' home.
Why was Herod so opposed to Jesus? Historians tell us that during his kingship Herod killed anyone he thought might try to take his throne, including close members of his own family. Although it didn't make sense for him to fear someone who was only an infant, he still tried to kill Jesus.
Herod was not the last to try this; since then countless evildoers have tried to destroy Jesus (usually by killing His followers). But they've never succeeded, and they never will, for God is stronger than the tyrants, terrorists and evildoers of this world.
On whose side are you? Christ's -- or the devil's? Make sure of your commitment to Christ, for some day God will intervene and all evil will be destroyed. Then this world will truly become "the kingdom of our Lord and of his Messiah, and he will reign for ever and ever" (Revelation 11:15).