Thought I'd chip in here:
The first ceasefire in 1994 was because the British Army had considerable assets tied up in Northern Ireland, and the nationalists in Northern Ireland were uniting around a political solution as the IRA had shown no capability of achieving their goals by force. People were tired in the IRA, and Gerry Adams (who advocated a political solution) was able to convince the IRA that a peace deal was in sight. Unionists were also getting tired of the constant violence, especially the UUP who were starting to show that they could agree to power-sharing in Northern Ireland. The IRA were also getting a lot of bad publicity, especially after the Warrington attacks that killed two kids.
The first ceasefire fell apart because Sinn Fein were getting nowhere, and the ones in the IRA that advocated military solutions were able to point to the failure of the peace process between 1994-1996. The British leadership wanted the IRA to decommission their arms before taking part in peace talks, while Sinn Fein told them to get lost, so they were in deadlock.
So - the IRA were back to violence in 1996-1997, but the reality was that the security forces had used the ceasefire to their advantage. They were able to do a lot of in-depth analysis into previous incidents, which is how they were able to catch the infamous sniper in South Armagh - https://en.wikipedia.org/wiki/South_Armagh_Sniper_(1990–97) - while they had also used the ceasefire to collect intelligence. It's too long to write here, but the security forces were closing in on the IRA as a whole, so it was better for them to go for a second ceasefire. The new Labour government was also very keen on a deal, so everyone was able to work together towards something realistic.
So - why has it held? It's essentially because people were tired of all the fighting. Sinn Fein has no real interest in violence (especially as they've enjoyed a lot of electoral success since 1997) now, and public opinion went massively against violence since the Omagh bomb went off. A lot of the Provisionals were also more interested in making money, while loyalists have also been mostly happy to support the DUP rather than restart war. It's also because the hated RUC was replaced by the PSNI, and the police are behaving themselves these days rather than being seen as an occupying force.
I'd say, most of all, the reason for peace holding is simply because people had had enough of violence. But I think it will explode again in our lifetimes.