“Shiva is a form of Vishnu and Vishnu a form of Shiva. Shiva dwells in the heart of Vishnu while Vishnu in the heart of Shiva.” (Skanda Upanishad)
Hari-Hara is composite form of God Vishnu (‘Hari’) and God Shiva (‘Hara’). Shiva, the ash-smeared ascetic, represents the realized soul who withdraw from the world. Vishnu, the gold-bedecked king, represents the realized soul who participates in the world.
There is a myth:
“The devas had looked upon the earth, and were horrified by the terrible state it was in. Everywhere there was greed, war and unhappiness. Confused as to how things could have become like this, they approached Vishnu to seek answers. Vishnu said to them as they assembled, “Let us go to Shiva, for He is wise!”
Vishnu led the demigods up the icy slopes of Mount Kailash, but saw no one there. Amidst the rocks and snow, there was no sign of Shiva or Parvati, or even Nandi. The baffled gods searched for a sign of Shiva until Vishnu came to them and said, “My beloved, your selfishness has made you blind, for Hara is here! You must purify yourselves, bathe in milk, sing the Satarudriya hymn, and take only hot milk for 3 days, and your eyes will be opened.” They followed his instructions, but after 3 days they still could see no sign of Shiva. They cried out, “O Jagannath, Lord of the World, where can we find Shiva?”
At that, Vishnu pointed to his chest. “He is in me, as I am in him. Can’t you see that?” As he spoke, he revealed his lotus heart, and as the petals opened, the sacred Lingam could be seen in the middle. The gods fervently worshipped the lingam, bathing it in milk, covering it with vermilion and sandal paste, offering flowers and chanting the 1008 names of Shiva. But through this, they were still disturbed, how could Hari and Hara be one and the same? Vishnu had light, Sattvic qualities, while Shiva had dark, tamasic qualities. They were so different! But knowing their thoughts, Vishnu took on the form of Shiva. The gods could no longer tell the difference between the trident bearing, three eyed god, or the conch bearing lord. And so, realizing finally that Vishnu and Shiva were one and the same, they bowed in devotion and worshiped Sri Hari-Hara.”
Harihara is thus worshipped by both Vaishnavites and Shaivities as a form of the Supreme God, also known as Shankaranarayana (‘Shankara’ is Shiva, and ‘Narayana’ is Vishnu) and sometimes used as a philosophical term to denote the unity of Vishnu and Shiva as different aspects of the same Supreme God.