Shalya was an uncle of two of the Pandavas (Nakula and Sahadeva). Why did he fight on the side of the Kauravas then?
Also, if you could provide the Sanskrit Shlokas to support your answer, that would be great (although, not necessary).
Hinduism Stack Exchange is a question and answer site for followers of the Hindu religion and those interested in learning more about Hinduism. It only takes a minute to sign up.Sign up to join this community
Shalya was the king of Madra and brother of Pandu's wife Madri, so naturally he wanted to fight on the Pandava side. But when Shalya and his army came, they were greeted by Duryodhana's men, who provided them with food, lodging, and entertainment. Shalya assumed that Yudhisthira was responsible for all this, so he wanted to reward him for the hospitality. But then he found out that Duryodhana was the one responsible, so he was forced out of a sense of honor to reward Duryodhana, as described in this chapter of the Udyoga Parva of the Mahabharata:
And when Salya was exceedingly pleased and ready to grant even his life, Duryodhana, who had remained concealed, came forward and showed himself to his maternal uncle. And the kind of the Madras saw him and understood that it was Duryodhana who had taken all the trouble to receive him. And Salya embraced Duryodhana and said, 'Accept something that you may desire.' Duryodhana thereupon said, 'O thou auspicious one, let thy word be true, grant me a boon. I ask thee to be the leader of all my army.'
So Shalya was tricked into fighting on the Kaurava side, despite his love for the Pandavas. In the course of the war, he killed Abhimanyu's brother-in-law Uttara (as I discuss in this answer), served as thr charioteer of Karna, and finally became the general of the Kaurava side after Karna died. Ultimately Yudishthira was forced to kill Shalya, which must have been an agonizing decision.
It's important to note, by the way, that even while fighting for the Kaurava side, Shalya still supported the Pandavas, and while driving Karna's chariot during Karna's fight with Arjuna he tried to demoralize Karna as much as possible. Shalya was fundamentally a good person put into a terrible situation, forced to fight his own nephews even though he knew that their cause was just.