King Herod ordered the deaths of all children in and around Bethlehem, under two years old. Matthew says that he feared that one of the infants, Jesus, would take over his reign as king.
However, there are problems with Matthew's account.
Firstly, the story of the birth of Jesus in Luke's Gospel could scarcely be more different from Matthew's, and Luke seems to rule out the "slaughter of the innocents".
Also, the Jewish historian, Josephus, does not mention this event, although his antipathy to King Herod means that he would have done so if he had known of it.
You can see why folk get confused can't you?