prison: the confinement of a person who is shut up and held, or the place where they are held
This word names the state of being shut up and, by extension, the place that holds a person there. It comes from a verb meaning to shut in, hold back, or restrain (כָּלָא), so at heart it is about a person being kept from going free rather than about a particular kind of building.
That root sense shows through in how the word is used. Kings send prophets and rivals "to prison" as a punishment or a way to silence them: Ahab does this to the prophet Micaiah, and officials do it to Jeremiah. The word can also describe the ongoing condition of a captive rather than a building, as when the exiled king Jehoiachin exchanges his "prison garments," the clothes he wore throughout his imprisonment, for a place at the Babylonian king's table.
It reaches into poetry as well. Isaiah pictures rescue as bringing people out of a "prison house" and out of the darkness, and elsewhere describes a defeated people hidden away in "prison houses." Whether the reference is a literal jail, a captive's long detention, or a poetic image of bondage, the single idea is confinement, of being held and not let go.