She went to school despite having a sore foot.

Literal

She [topic-は] foot [subject-が] was-painful [despite-にもかかわらず] school [to-へ] went.

~にもかかわらず ('despite, in spite of, notwithstanding') is a formal concessive marker, attaching to a plain-form clause. More elevated than ~のに ('despite' but stiffer); common in writing and serious spoken contexts. 足が痛い is the canonical pain-with-が construction — Japanese marks the painful body part as the subject of 痛い. 学校へ行った uses the directional へ for going to school; に would also work and is interchangeable here.