She [topic-は] hat [object-を] wearing [as-is-まま] room [into-に] entered-came.
~たまま means 'while still in the state of having done X' — she entered without removing her hat. 入ってきました uses ~てくる to show the action from the observer's perspective inside the room.