The Catechism in Questions & Answers

170. How did Jesus fare before Pilate and Herod?

After Jesus had been condemned by the high council—the highest authority in Judea—He was given a hearing before the Roman governor Pontius Pilate. The latter was responsible for the area since the Jews were under Roman rule at the time.
Pilate saw no fault in Jesus and thus sent Him to Herod (who was surnamed Antipas), the king of the Jews. Since the Jews were forbidden by the Romans to carry out a death sentence, Herod sent Jesus back to Pilate. The latter had Jesus scourged. The people demanded Jesus’ crucifixion and accused Him of having exalted Himself over the Roman emperor as the “King of the Jews”. This offence was punishable by death (cf. John 19: 12).
Pilate thought he knew a way to grant Jesus His freedom: since it was customary for one convicted individual to be pardoned at the Passover feast, the people were to decide whether Jesus or the criminal Barabbas should be released. Stirred up by the chief priests and elders, the people chose Barabbas. In order to bring to expression that he was not responsible for what was to follow, Pilate washed his hands before the people and said: “I am innocent of the blood of this just Person...” (Matthew 27: 24). He had Jesus scourged once again and then turned Him over to the soldiers for crucifixion.

Jesus’ birth occurred during the rule of Herod I. When Jesus was led before Pontius Pilate, Herod Antipas, the son of Herod I, reigned in Galilee.
Scourging was a means of corporal punishment and torture in antiquity, by way of which a person would be struck with whips, rods, or canes by his tormenters. The gospels tell of the scourging of Jesus, while the Acts of the Apostles record the occasions on which the Apostles had to endure scourging.