She was tired, so she leaned against an apple tree.

Literal

She [topic-は] was-tired [so-ので] apple tree [to-に] leaned-on.

よりかかる ('to lean against') is a compound — 寄る (approach) + かかる (hang/lean). A gentle, pastoral image.