Deoxygenated blood enters the heart through the superior and inferior cava veins to the right atrium.
When the right atrium is full of blood, the heart valves (tricuspid valves) open and the blood flows to the right ventricle. Once the ventricle is full, the heart valves close, and the ventricle contracts sending the blood through the pulmonary valves to the pulmonary arteries.
Then the deoxygenated blood will flow to the lungs where it will be oxygenated. Once the blood is oxygenated, it flows back to the heart through the pulmonary veins to the left atrium.
Once the left atrium is full, the heart valves (mitral valves) open and the blood flows to the left ventricle. When the ventricle reaches its maximum capacity it contracts and the blood is sent through the aortic valve into the aorta, and through this and other arteries, the oxygenated blood is transported through the whole body.