She observed how butterflies fly.

Literal

She [topic-は] butterflies [subject-が] how fly [question-か] [object-を] observed.

どのように飛ぶか is an embedded question — 'how (they) fly' — functioning as the object of 観察する ('to observe'). The embedded question keeps its interrogative structure (どのように + か) inside the larger statement. 蝶 ('butterfly') and 観察する ('to observe') are both written-register words that give this sentence a studious, scientific feel.