Fetching details from the dictionary...

to shut oneself in (e.g. one's room); to be confined in; to seclude oneself; to hide away; to stay inside (one's shell)
to fill with (emotion, enthusiasm, power, etc.); to imbue with; to infuse with
to fill a space (of a gas, smell, etc.); to be heavy with (e.g. smoke); to be stuffy; to be dense
to be muffled (e.g. voice)
to hold (a castle, fortress, etc.)
to confine oneself in a temple to pray
試験の前は図書館にこもって勉強した。
Before the exam, I secluded myself in the library to study.
彼女の歌声には特別な感情がこもっている。
Her singing voice carries a special emotion within it.
湿気が浴室にこもって壁にカビが生えた。
Humidity built up in the bathroom and mold grew on the walls.