She shut herself in her room.

Literal

She [topic-は] room [in-に] shut-self-in.

閉じこもる means 'to shut oneself in, to hole up.' An intransitive compound verb — 閉じる (close) + こもる (to be confined).