The most fundamental of Hindu deities, is the Trinity of Brahma, Vishnu and Shiva - popular deities include Ganesha, Krishna, Hanuman and goddesses like Lakshmi, Durga,Saraswati.
Shiva had accused Brahma of creating a world full of misery, a world of illusions. Brahma's answer was that he had just created the world, not the misery. The world he said was neither beautiful nor ugly; neither joyful nor sorrowful; neither right nor wrong. The world just is. Right and wrong joys and sorrows are only the perceptions of the mind. But Shiva'a retort was that Brahma had also created the mind which was becoming the root of so much sorrow. Brahma"s answer to this was that the mind can either choose to be deluded or it can be enlightened with truth. But then the question arose as to who controlled the mind. This was a significant question and Shiva meditated on it at Avimukta in Kashi. He looked for a way in which the mind could be controlled could be taught to see the truth to free itself of all illusions. He ultimately found a way- Yoga.
Shiva offered this knowledge to the anyone who felt the need. He sat under a banyan tree facing south i.e. dakshin and did not ask for any fees i.e. dakshina for his teachings and thus came to be called Dakshinamurti.