There’s a cultural difference in the terminology here.
In Britain, prison = jail, both refering to the building itself (oh, and also the obsolete ‘gaol’). Then there’s ‘remand’, which is people held prior to a trial (as in the OP). But they’re held in a jail anyway.