gustar
Gustar doesn't mean 'to like' — it means 'to please.' The thing you like is the subject. The sentence runs in reverse.
gustar (structure)
The thing liked is the grammatical subject. Me gusta = it pleases me. Me gustan = they please me.
Me gusta el café. / Me gustan los gatos.
I like coffee. / I like cats.
Singular coffee → gusta. Plural cats → gustan. The verb agrees with the thing liked, not the person.
¿Te gusta vivir aquí?
Do you like living here?
Infinitive as subject = always singular. '¿Te gustan vivir?' is wrong even though there might be many aspects of living here.
A ella le gusta, pero a mí no.
She likes it, but I don't.
The 'a + person' clarifies who — essential when the indirect object pronouns could be ambiguous.
gustar (family)
Encantar, molestar, doler, faltar, parecer — all follow the same reverse structure.
Me encanta el flamenco.
I love flamenco.
Encantar = to love (things/activities). Same structure as gustar. Never 'amo el flamenco' for things — that's for people.
Me duele la cabeza.
I have a headache. (My head hurts me.)
Doler follows gustar structure — the aching part is the subject. 'Tengo dolor de cabeza' also works.
Me molesta el ruido.
The noise bothers me.
The noise is what's doing the bothering — it's the subject. Molestar, like gustar, runs in reverse.
Tricky bit
The most common error: 'yo gusto el café.' Wrong — gustar is never used this way. Also: 'me gustas' (I'm attracted to you / I like you as a person) vs 'me gusta' referring to a thing. And 'gustar' between people means romantic attraction — use 'caerle bien' for friendly liking: 'me cae bien' = I like him (as a person).