Barabbas was a bandit who was chosen to be set free instead of Jesus. He was part of a group of rebels who had committed murder. The Bible speaks little of him and does not tell what happened after he was released.
At Easter time, the Roman governor traditionally released a Jew from prison. When Jesus was arrested, Governor Pilate saw that he was innocent and tried to defend him but the people would not listen. So Pilate decided to use the Passover tradition to free him. He gave the people a choice: to release Jesus, who had not committed any serious crime, or to release Barabbas, a known criminal of bad character. But, against their expectations, the people chose Barabbas. Pilate respected his choice and released Barabbas, sending Jesus to die on the cross ( Mark 15: 6-15 ).
See here: who was Pontius Pilate?
Murder and insurrection were crimes with the death penalty. If Barabbas had not been released, he probably would have been crucified. Barabbas deserved to die, Jesus did not. Jesus died in the place of Barabbas.
Nobody knows what happened to Barabbas afterwards. He now had a second chance: he could choose to continue in his bad life or change and follow Jesus. Each of us is like Barabbas, condemned to die in our sins. But Jesus died in our place ( 1 Peter 3:18 ). Now we have the same choice as Barabbas and we can complete his story in our lives.