Bhagwan Vishnu is the preserver and protector in the Divine trinity. He is the Supreme Being who protects Dharma and takes different incarnations whenever the need arises to uphold Dharma and its values. In his part of preserving Dharma in every Yug when it was being troubled by demonic forces, Bhagwan Vishnu took incarnations which are prominently known as the Dasavatar. However, there are other incarnations of him which he took to fulfil certain specific causes too and hence are named as his divine forms apart from the Dasavatara. One such avatar is of the Nar Narayan avatar.
The Bhagavat Puran mentions this divine Avatar of Bhagwan Vishnu in the preservance of Dharma. The Nar Narayan are twins, one being the Nar (Human form) , Narayan (Divine form), but with one soul. They are prominently worshipped in Badrinath Dham as the twin pair of Bhagwan Vishnu.
Once, there was a great demon by name Sahasra Kavach who had thousand armours attached to him given as a boon by Brahma Ji. He was unconquerable by anyone due to his armours and tormented the words with his power. When all sought refuge in Bhagwan Vishnu to protect them, he divided his form into the twin pair of Nar and Narayan and was they were born as the sons of Brahma.
They started observing great penance to obtain strength to defeat Sahasra Kavach. Sahasra Kavach came to know about this and challenged them for battle. As he had the power to fight continuously for years together, both Nar and Narayan took turns in fighting him. Each of them fought with him for five hundred years, while the other observed penance. In this way, every five hundred years, they started breaking one of his armour. In this way, they fought with him for a thousand years and finally Sahasra Kavach was left with only one armour.
When it was the turn of Nar to break the final armour of Sahasra Kavach and destroy him, the demon fearing for his life, went and hid in the shadows of the Sun God, and came to be seen nowhere. Later he transformed his soul into the Sun God, and was born as his son, who was none other than Karn of the Mahabharat. To finish the final battle with Sahasra Kavach, Nar was born as the third Pandav Arjun and Narayan was none other than Shri Krishna. In the final war of the Mahabharat, Arjun kills Karn and finally puts an end to their long battle with Sahasra Kavach. It was for this very reason that Shri Krishna and Arjun were never separable and Shri Krishna treated him as his own entity.
The celestial dancer Urvashi is said to be born from the thigh of Narayan. Once worried for his throne, Indra sends beautiful Apsaras to disturb the penance of Nar and Narayan. But Narayan creates Urvashi who is even more beautiful than all Apsaras and shows Indr that the throne has no value for the twins.
Thus devoting their life to only preserving dharma and its conduct, the twin pair of Nar Narayan is synonymous with both the intellect of Narayan and the power of Nar, both combined to be the divine avatar of Bhagwan Vishnu.