The heart undergoes contraction (systole) and relaxation (diastole).
Systole
When the ventricular muscles contract, the cuspid valves (tricuspid and bicuspid) close preventing backflow of blood into auricles.
The volume of the ventricles decreases while pressure increases.
This forces blood out of the heart to the lungs through semi-lunar valves and pulmonary artery, and to the body tissues via semi-lunar valve and aorta respectively.
At the same time the atria are filled with blood.
The left ventricle has thicker muscles than the right ventricle, and pumps blood for a longer distance to the tissues.
Diastole
When ventricular muscles relax, the volume of each ventricle increases while pressure decreases.
Contractions of atria force the bicuspid and tricuspid valves to open allowing deoxygenated blood from right atrium into right ventricle which oxygenated blood flows from left atrium into the left ventricle.
Semi-lunar valves close preventing the backflow of blood into ventricles.
The slight contractions of atria force the blood flow into ventricles.
Read more at: https://www.easyelimu.com/high-school-notes/biology/form-2/item/686-transport-in-plants-and-animals