My father told me to mend my ways.

Literal

Father [topic-は] me [to-に] reform [so that-ように] said.

改心する means 'to reform oneself, to mend one's ways.' Combined with ~ように言う for an indirect command.