They were a part of a UN peacekeeping force stopping the religious civil war between the Christians and Muslims. As usual the Muslims were trying to exterminate the Christians.
Kinda. It is a lot more complex than that.
Lebanon had long been kind of an interesting nation. For one, like Iran they set themselves apart in the various Arab-Israeli wars other than the 1948 War, and remained officially neutral. And they became the primary nation taking in Palestinian Refugees after that and the following conflicts.
But the Lebanese Civil War was long in coming. Initially between various Druze and Christian militias who objected to coming under fire from Israeli retaliations whenever the PLO, ANO, or other organizations attacked Israel. That is the violence that initiated UNSCR 425 in 1978.
And it was not at all "Muslims trying to exterminate Christians". It was an ugly civil war that pitted Muslims, Christians, and Druze against each other. And as often as not they were attempting to protect Muslims from attacks by Druze and Christian groups. In that it is not unlike what happened in Yugoslavia.
This is why it was an interpositional war. This was the era where the UN was trying to replicate their successes in Cyprus, and thinking that if they put themselves between the two (or in this case three) warring sides, they could make them stop fighting. Did not work that well, as all three of them would fire against the UN forces as happily as they would against each other.
A situation even more complex when you add in Israel who did not want to stop trying to eliminate the PLO, and Syria who were supporting a significant number of Jihadists in the hopes that the Lebanese Government would completely collapse and they could take over and run the nation by proxy.
I knew a lot of guys that served in the Beqaa Valley in that era, and more than one told me it was an ugly situation. The nation was around 50% Muslim (pretty evenly split between Shia and Sunni), 40% Christian, and the remaining 5% Druze and Jews. And when the government fell apart, it broke into four camps. The Druze and Christians largely got along, so there was little fighting between them and sometimes they cooperated. And the Jews just tried to hide and wait it out.
But the Muslims, they broke down into pretty much fighting everybody. They fought each other, they fought the Druze, they fought the Christians. They fought the Lebanese Government, and they fought the UN forces. That most times when they responded to an attack and it was Christians-Druze, the attackers would withdraw as they arrived. But with the various Muslim groups, it almost always resorted in a firefight.
Quite often resolved when the USS New Jersey would "clear her throat", and the groups would scatter.