From the TARDIS Wiki:
The Aplans were humanoid life-forms with two heads. The heads apparently had their own separate intelligence and personalities as, for in at least one period, heads of the same body were allowed to marry each other. The church later attempted to ban this practice. According to the Doctor, the Aplans were a relaxed and cheerful species - a fact he attributed to having the constant company of a second head.
The Aplans were mentioned in the 'Doctor Who' episodes "Time Of The Angels" and "Flesh And Stone".
What was a biological fact of life for the Aplans was used as a fashion statement by President of the Galaxy Zaphod Beeblebrox, who took on a second head as an accessory (as seen in 'The Hitch-Hiker's Guide To The Galaxy'). I think it's safe to assume he got the idea from the Aplans of Alfava Metraxis.