。
She was wearing a thick coat to protect against the cold.
Literal
She [topic-は] cold [object-を] prevent [for-ために] thick coat [object-を] was-wearing.
寒気 here is read さむけ ('chill / cold sensation'), not かんき (also possible, but more literary/medical). The reading distinction matters: さむけ refers to the bodily sensation of cold, often the chill that accompanies a fever or anxiety, while かんき refers to cold air or atmospheric coldness. Context (she's wearing a coat against it) supports さむけ. ~ために ('in order to') marks purpose. 着ていた is the past form of ~ている in its 'wearing' state-sense — she was in the state of having put on a coat. Compare to 着た ('put on,' a single past act) — the ~ていた frames a continuous condition rather than a one-time donning.