Judas, one of the closest to him, one who has been entrusted with care of the money, betrays him. Peter, one even closer than Judas, out of fear for his own safety, denies that he even knows him.
An assembly of religious leaders try to get him to admit that he has claimed to be the Messiah, he responds "if I tell you, you will not believe and if I question you, you will not answer, but from now on, the Son of Man will be seated at the right hand of the power of God. They then ask him if he was the Son of God. He again answers indirectly, "You say that I am." They take these comments to be an admission that he had in fact claimed to be the Messiah, the Son of God.
They bring him before Pilate, the representative of Roman power in Judea. Pilate would have little interest in their theological disputes unless they had an impact on what he was interested in--keeping the peace. They make charges against Jesus that would be disturbing to Rome, "He told us not to pay taxes to Rome because he is the Messiah, a king."
Pilate asks Jesus if he claimed to be the King of the Jews. Jesus responds to him in a manner similar to the response he made to the religious authorities, "You say so." When Pilate can't find any threat to Roman power in this response, the religious authorities remind him that Jesus has been stirring up the crowds throughout Judea, from Galilee to Jerusalem.
Hearing Galilee, Herod determines that Jesus is under Herod's jurisdiction. Since Herod happens to be in Jerusalem at the time, Pilate turns him over. Herod is pleased because he has heard so much about him and hopes for a sign. But, Jesus is no more cooperative with him than he had been with Pilate.
Herod and his soldiers treat him with contempt dressing him up in a king costume and send him back to Pilate (Neither Matthew nor Mark mention Herod's involvement in the trial.)