Answer: Paul, like the other Apostles, was hated by most of the Jews because they 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.
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.
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.
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 (Acts 16:16 - 18).
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 (Acts 24:26 - 27). Paul is eventually sent to Rome by ship in order to have Caesar hear his case.
After spending a little more than two years in a Caesarea prison (Acts 24:27), the apostle is escorted to Rome by a Centurion. He eventually arrives in the city and spends time in a hired house (28:30), while under arrest, for about two years as he awaits his trial and ultimate acquittal in the spring of 63 A.D. Paul, in mid to late 67, 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.