General term for a jail or prison; can refer to the building or the institution. Slightly colloquial compared to 刑務所.
He was put in jail.
The prisoner who escaped from jail has not been caught yet.
牢屋 is a colloquial, somewhat old-fashioned word for a jail cell, while 刑務所 is the formal, official term for a prison.
牢屋 is a common, everyday word for a jail cell, especially in historical settings, while 獄 sounds more formal or archaic.
Compound of 牢 (ろう, 'prison') and 屋 (や, 'house/shop'). The exact historical derivation is uncertain, but the combination straightforwardly means 'prison building'.