Paul, like the other Apostles, was hated by most of the Jews because he openly and publicly taught that Jesus was the Son of God. The Jews thought this was blasphemy against God and were more than willing to throw someone in jail over the issue. Ironically, before his conversion, Paul persecuted many people and put several of them in prison as well.
Now Saul (Paul's name before his conversion), still breathing out threatenings and slaughter against the disciples of the Lord, went to the high priest, asking him for letters to take to the synagogues at Damascus, so that if he found any who were of that way, he might bring them bound, both men and women, to Jerusalem (Acts 9:1 - 2, HBFV).
For you heard of my former conduct when I was in Judaism, how I was excessively persecuting the church of God and was destroying it (Galatians 1:13, HBFV).
The Christians were afraid of Paul, after his conversion, because they didn't believe that he was converted. They remembered how he had treated their brethren in the past. The more zealous a Jew was about their belief in God, the more they hated the Apostles. Consequently, they were persecuted and put in prison more than most people (see Acts 5:17 - 18).
All the Apostles, including Paul, were beaten, hauled off to jail, and almost all (with the exception of John) killed for their beliefs. Christ told them "no man is greater than his master" (John 13:16), and He also said, to paraphrase, "they would drink out of His cup." In both statements, He was telling them they would be persecuted and killed as He was.
Jail Time
The exact time and duration of when the evangelist was in prison can vary depending on which commentary or reference work is used. Below are some of the times, listed in the Bible, where the apostle found himself in jail.
Philippian Jail
In Philippi, during what is called his second missionary journey, Paul casts out a demonic spirit from a slave girl. Her masters, however, who had been making a living from the woman's spiritual powers, become angry with the evangelist. They stir up the entire city against him and fellow-evangelist Silas such that they are arrested, beaten and put in prison.
Then a multitude rose up against them (Paul and Silas), and the captains tore off their garments, and commanded that they be beaten with rods. And after laying many stripes on them, they cast them into prison, commanding the jailer to keep them safely (Acts 16:22 - 23, HBFV).
Prisoner by the Jews
Jews from Asia, who hate Paul, see him at the temple in Jerusalem and believe (wrongly) that he is bringing unconverted Gentiles into a part of the temple area where they were forbidden. They loudly accuse him of wrongdoing and stir up a riot against him. The mob violently lays hands upon him and drags him out of the temple. As they begin to beat the apostle to death the Roman army shows up and saves his life (Acts 21:30 - 32).
For Paul's safety, he is taken at night by 200 Roman soldiers to Caesarea. It is in Caesarea that Governor Felix resides and where the trial against the apostle can be heard. Although Felix believes that he is innocent, he keeps him in prison for more than two years in the hopes someone will offer a bribe to free him.
Moreover, he (Felix) was also hoping that money would be given to him by Paul, so that he might release him; for this reason, he sent for him and conversed with him more often. But at the end of two years, Felix was succeeded as governor by Porcius Festus; and, desiring to gain favor for himself with the Jews, Felix left Paul bound (Acts 24:26 - 27, HBFV).
Paul is eventually sent to Rome by ship in order to have Caesar hear his case.
The apostle, after spending a little more than two years in a Caesarea prison, is escorted to Rome by a Centurion. He eventually arrives in the city and spends time in a hired house (Acts 28:30), while under arrest, for about two years as he awaits his trial and ultimate acquittal in the spring of 63 A.D.
The Last Incarceration
Paul, in mid to late 67 A.D., is arrested again but this time ends up in a jail cell in Rome. He is incarcerated until he is beheaded by the Romans around May or June of 68.
Technically speaking, the Apostle Paul is under arrest for about five years during his ministry. About two and one half years of this period is spent in a literal prison cell. The rest is spent under house arrest or being escorted by a Roman soldier from Jerusalem to Rome.