Chest compressions (part of CPR) are intended to keep the blood moving around the body. Mouth to mouth is intended to keep air going into the lungs.
If someones heart has stopped beating in a cardiac arrest then it's rare that a thump on the chest or chest compressions will make it start again. They mostly need treated with an electric shock defibrillator device.
The chest compressions that you do in first aid are really just buying time until a defibrillator arrives - and this is why you should never stop until professional help turns up on the scene.