She apologized for stepping on my foot.

Literal

She [topic-は] my foot [object-を] stepped-on thing [object-を] apologized.

詫びる ('to apologize, make amends') is a slightly formal, written-leaning verb compared to the everyday 謝る — both mean 'apologize,' but 詫びる has a more reflective, contrite feel. ~たことを詫びる nominalizes the past action with こと and marks it with を as the object of the apology — 'apologize for the act of having X.' 足を踏む is the standard phrasing for 'step on someone's foot,' a recurring micro-grievance in crowded trains and public spaces.