The sinoatrial node (SAN) works as a pace maker for the heart, and sends electrical impulses to the atrium causing them to contract, this impulse is then stopped by muscle fibres.
After a short delay, The Atrioventricular node (AVN) sends electrical impulses down the bundle of His to the apex of the heart. This causes the ventricles to contract from base upwards.