Jesus is continuing his journey to Jerusalem. On the way, some Pharisees warn him that Herod wants to kill him. That's the same Herod that when confronted by John the Baptist had him beheaded.
The Pharisees warn him. We are accustomed to thinking of them as enemies of Jesus. Fred Craddock in Preaching through the Christian Year C points out that in Luke's gospel, offers a more favorable description of this group than do the other gospels; e.g., many are open to Jesus (7:36; 11:37; 14:1) even though they do disagree with his interpretation of the law. Another example is the Pharisee, Gamaliel, and Paul, of course (see Acts 4:34; 23:6).
Jesus hears their warning, but stresses to them that despite certain dangers, his work must be done.