"The prisoners are in prison."
Translation:Les prisonniers sont en prison.
You can use English as a guide: in prison, in class, versus in the house, in the box, in the car.
And you can also think about the meaning. "In prison" doesn't refer to a specific prison. "In the house" refers to a specific house.
(France is a specific country but it's actually a bad example because it's a different sort of case. Masculine countries that start with a consonant use "au", which has the article hidden in it.)
There are probably exceptions.