To have a headache / I have or I’ve got (US) a headache – tener dolor de cabeza
To have a backache – tener dolor de espalda
To have an earache – tener dolor de oídos
To have a stomach ache – tener dolor de estómago
To have toothache- tener dolor de muelas

If you feel ill or sick, you make an appointment (pedir cita) to visit a doctor, you describe your symptoms and he/she will diagnose you and then give you a treatment and a prescription (receta) with the medicines and instructions you need to follow.