Some species use their ears not just for hearing, but for communicating as well. The ear can be made to change its orientation by flexing the muscles in its base.
Housecats are a great example. They have several distinct ear positions. When relaxed, their ears point slightly outward from the head. If a noise alerts them, the ears snap forward like sound-gathering radar. One ear may even point in a different direction from the other, if two sound sources are of interest to the cat.
An angry cat will flatten its ears against its head to prevent them from being damaged in a fight, but there's also a half-flattened position they can adopt in which the backs of the ears become visible in front. This almost flattened posture is a signal to other cats that they'd better stay away.
Some wild cats have even developed specialized markings on the backs of their ears to increase this effect. Tigers, for example, have a white spot with a black rim on the back of each ear. If you can see that spot from the front, it's time to be getting along.