My mother advised me to go to the dentist.

Literal

Mother [topic-は] dentist [to-に] go [indirect-command-ようにと] advised-[benefactive-てくれた]

忠告してくれた = 'advised (for my benefit).' ~ようにと marks the content of the advice. 歯医者 = dentist.