The closing of the mitral and tricuspid valves (known together as the atrioventricular valves) at the beginning of ventricular systole cause the first part of the "lub-dub" sound made by the heart as it beats. Formally, this sound is known as the First Heart Tone, or S1. This first heart tone is created by the closure of mitral and tricuspid valve and is actually a two component sound, M1, T1.
The second part of the "lub-dub" (the Second Heart Tone, or S2), is caused by the closure of the aortic and pulmonary valves at the end of ventricular systole. As the left ventricle empties, its pressure falls below the pressure in the aorta, and the aortic valve closes. Similarly, as the pressure in the right ventricle falls below the pressure in the pulmonary artery, the pulmonary valve closes. The second heart sound is also two components, A2, P2. The aortic valve closes earlier than the pulmonary valve and they are audibly separated from each other in the second heart sound. This "splitting" of S2 is only audible during inhalation.