The heart is divided into four chambers - the right and left atria on top which receive blood and the right and left ventricles below which pump blood out. The atria and ventricles are separated by valves which allow blood to flow in only one direction. The right side receives deoxygenated blood from the body and pumps it to the lungs, while the left side receives oxygenated blood from the lungs and pumps it out to the body. Valves prevent backflow through the heart's chambers and vessels.