Peter denied Jesus three times, as recorded in all four Gospels (Matthew 26:69-75, Mark 14:66-72, Luke 22:54-62, John 18:15-27). During the Last Supper, Jesus predicted that Peter would deny Him three times before the rooster crowed. Peter protested, insisting he would never disown Jesus even if it meant death (Matthew 26:35).
However, after Jesus was arrested and taken to the high priest's courtyard, Peter followed at a distance and sat among the guards. Three separate times, different people identified Peter as a follower of Jesus: a servant girl at the gate, another servant girl, and bystanders who recognised his Galilean accent. Each time, Peter denied any association with Jesus, the third time with cursing and swearing. Immediately after the third denial, the rooster crowed, and Peter remembered Jesus' prediction. He went outside and wept bitterly (Matthew 26:75).
Thomas is often called "Doubting Thomas" because he initially doubted the resurrection (John 20:24-29), but he did not deny Jesus. John remained faithful and was present at the cross (John 19:26). Judas betrayed Jesus by handing Him over to the authorities for thirty pieces of silver, which is a different act from denial.