She shut herself in her room.

Literal

She [topic-は] her own room [in-に] shut-herself-in.

閉じこもる (閉じる 'close' + こもる 'be confined / stay shut up') is a compound verb meaning 'to shut oneself in, to seclude oneself.' The に marks the location of confinement. The verb has emotional weight in modern Japanese: the related 引きこもり ('hikikomori,' extreme social withdrawal) is built from the same こもる, so 閉じこもる often hints at emotional retreat, not just physical seclusion.