。
She taught me how to swim.
Literal
She [topic-は] me [to-に] swimming-method [object-を] taught [for me-てくれた].
The ~方 nominalizer is one of Japanese's most productive 'how to' patterns: verb i-stem + 方 (かた) = 'way of doing.' 泳ぎ方 ('how to swim,' literally 'swimming-way') is the natural form here. Alternatives like 泳ぐことを教える ('teach the act of swimming') would feel oddly abstract. Native speakers reach for ~方 instinctively for 'how-to' instruction — it appears constantly on cooking shows, in instruction manuals, and in everyday teaching contexts.