In a closed system:
total momentum before an event = total momentum after the event
Conservation of momentum explains why a gun or cannon recoils backwards when it is fired. When a cannon is fired, the cannon ball gains forward momentum and the cannon gains backward momentum. Before the cannon is fired (the ‘event’), the total momentum is zero. This is because neither object is moving. The total momentum of the cannon and the cannon ball after being fired is also zero, with the cannon and cannon ball moving in opposite directions.