In the US, a jail is a county institution that holds people waiting for trial. A prison holds people who have been convicted and sentenced. States and the Federal government have prisons.
A county might have a prison and a jail, or it might have only one building, which is usually called a jail, but which might hold people both before and after trial.
Is there a difference between 'prisao' and 'cadeia'? Is 'cadeia' jail and 'prisao' prison?
Prisão is more general... Cadeia is a small prison for detention, in the districts... A penitentiary [penitenciária] is a prisão...