She was surprised to learn that he had suddenly changed his mind.

Literal

She [topic-は] [he [subject-が] suddenly thought [object-を] changed [nominalizer-の]] [object-を] knew-and was-surprised.

考えを変える ('change one's mind,' literally 'change one's thought') is a stock collocation. The whole event is nominalized via の and marked を as the object of 知る ('learn, find out'). The te-form 知って then links to 驚く ('be surprised') in a sequence-of-cause-and-effect ('learning ~, was surprised').