A heart beat is comprised of a fairly complex set of nerve impulses and motions, collectively known as the cardiac cycle. During the cardiac cycle, blood first fills the atria, which are the upper chambers of the heart. The atria then contract and move the blood into the ventricles, which are the lower chambers. Then the ventricles contract and push the blood into the pulmonary artery (which goes from the right ventricle to the lungs) and the aorta (from the left ventricle to the body).
The timing of the contractions of the upper and lower chambers is important; if all four chambers were to contract simultaneously, the blood would not be able to pass from the atria to the ventricles, as the ventricles would be closed tight at that point. Consequently the AV node causes a brief delay in the electrical signal, so that the atria contract while the ventricles are still relaxed and able to receive the blood. Immediately after the atria contract, the ventricle do the same, so the blood is moved along from the upper chambers to the lower ones and out of the heart in a short span of time. Then the heart relaxes briefly, which allows the atria to refill and the cycle is repeated.