Breakdown of Ele foi ao cabeleireiro e mandou aparar a barba.
ele
he / it (referring to a masculine noun)
e
and
ir
to go / to be gradually (doing) (+ gerund)
ao
to the, at the (a + o)
Questions & Answers about Ele foi ao cabeleireiro e mandou aparar a barba.
Why is it mandou aparar a barba instead of using a past participle like English "had his beard trimmed"?
To say that you arranged for a professional to do something for you, Portuguese uses mandar + the infinitive (aparar), followed by the thing being worked on (a barba). Even though mandar can mean to order or command in other contexts, in service situations like this it does not sound bossy at all — mandar aparar, mandar cortar, and mandar consertar are simply the natural equivalents of "to have (something) trimmed / cut / fixed."
Why does Portuguese say a barba ("the beard") instead of "his beard"?
When talking about parts of the body, Portuguese normally uses the definite article (o, a, os, as) instead of a possessive word as long as it is clear whose body part it is. Since ele is the subject of the sentence, a barba is naturally understood as his own beard without needing to add dele.
Doesn't cabeleireiro mean the hairdresser (the person) rather than the shop?
Yes, o cabeleireiro is the person, just like o médico (the doctor) or o dentista (the dentist). However, with ir a (foi ao cabeleireiro, where ao combines a + o), naming the professional is a very common way to say you went to their workplace. You will also hear ir ao salão (to go to the salon) or, specifically for beards and men's hair, ir à barbearia (to go to the barbershop) and ir ao barbeiro (to go to the barber).