Ceasefire, armistice, truce - that's three words for the same thing. Or actually, for multiple things that most people believe are one thing.
The most naive idea about ceasefires is that they end the suffering and give politicians time to negotiate a peaceful solution for the conflict (case 1). This is hardly ever the reality. It does work occasionally when the violence is merely centrally controlled harassment (which the media of at least one side will call "terrorism"). I wrote "centrally controlled" because decentralised control or undisciplined personnel would undermine the ceasefire with unauthorised harassment actions.
There are many more motives for calling for (and agreeing to) a ceasefire, especially
(2) the intent to prepare better for later violence during the break
(3) the refusal to accept the favoured side's (possibly the own) defeat
(4) to prepare for decisive action without the unnecessary suffering from harassing fires.
Just look at the war in Syria. Did the West call for a ceasefire when the rebels attacked? No. It called for ceasefires when the rebels were in trouble due to bombardment and regime forces' advances region.
Feel free to look up further examples. I dare say you won't find an example for a great power government calling for a ceasefire while it (or its preferred war party/proxy) was winning.
Sometimes such ceasefires actually happen while one party advances because even then it fears increased foreign meddling (even military intervention) and caves to the threat, though only for a while. Militarily successful powers usually agree to a ceasefire when they reached the culmination point or some limited objective anyway. A ceasefire can be quite resource-saving if it begins just after you encircled your opponent. His foodstuff runs out and he's forbidden to try to break the siege (= the probability of foreign intervention on his behalf is slightly reduced if he violates the ceasefire first).
The worst thing about ceasefires is the same reason for why Western politicians call for ceasefires so often: It keeps one side from losing the war right away. Or in other words; ceasefires extend wars. Wars that could see one side 'win' in a few months become protracted and last years, with the duration of fighting, the loss of life and the loss of property much greater than if it had ended quickly.
This is hard to prove because we cannot observe alternative timelines, but the history of particularly civil wars of the last couple decades convinced me that case (3) is an evil one. It makes war worse, not less terrible. The cases (1) and (4) are noble ones. Case (2) is a cynical one, but may have a similar effect as case (4).
We have three words in English for this, but there are at least four different cases - and even worse, all three words are used for all four cases. It's no mystery why expectations and reality rarely meet when it comes to ceasefires.
The world would be a more peaceful, better world if at least once in a while we (and especially our foreign policy) would be more willing to accept that the war party we sympathise with is losing. Defeat in war is often times less terrible than war itself, especially if the defeat is quick and happens before the hate, propaganda and expectation for benefits from victory built up much.
- - - - -
Ceasefires are also of interest from a military theory point of view. They would typically not be within the authority of those who are tasked to lead the war effort in a theatre of war, so they are at least partially exogenous influences. The armed forces need be able to exploit the break well and quickly, and this is -as so much in war- to be measured relative to the opposing forces. Corps and higher commanding officers also need to know when and how to suggest and request a ceasefire to politicians, and might actually prepare for its exploitation in advance.
Ceasefires also happen at the local level, though only unofficially. Both forces may harass each other much with indirect fires and snipers to no end other than to harm each other. This kind of pointless suffering may be much-reduced if approximate parity in harassing capability can be achieved and thus the conditions for a local ceasefire be created. The communication of this ceasefire usually needs to be unofficial and secret, of course. Rarely will a third party such as an ambassador from a foreign country or the International Red Cross, be able to relay the messages.
An interesting facet is that even armed forces with a great inferiority in harassing capability might achieve such low level ceasefires if they move the harassing capability into unruly sectors till the sector falls silent. The other side's higher command might force a break of such local ceasefires if it realises what's happening (seemingly to its disadvantage), though.