To clear things ups, S1 and S2 are the sounds of the valves closing during the cardiac cycle. Assuming there is no underlying pathologic condition in a patient's heart, the S1 is the sound you hear when the "AV valves" (tricuspid & mitral) are closing. The S2 sound you hear is the sound of the semilunar valves (i.e. aortic and pulmonic) closing.
You can appreciate the "lub dub" during auscultation because the valves are closing.
As far as your question goes, again, assuming a healthy heart and in broad stroke terms: the atria receive blood while the ventricles are in systole (right atria from the inferior and superior vena cava, and the left atria from the pulmonic circulation); the ventricles receive blood from the atria when the atria are in systole. Again, there is some minutiae we can suss out if you'd like, but you can conceptualize it like this.
Ventricular Systole (squeezing): the AV valves are closed during this time while the semilunar valves are mostly open -- they have to generate enough force to open the valves (aka "afterload" -- specifically LV).
Ventricular Diastole (relaxing): the AV valves open and atria contract to fill the ventricles with blood. The relaxed ventricles receive the blood from the atria.
Again, this is an extremely general way to look at it. I can go over a Wigger's Diagram and/or left ventricular Flow-Volume Loops with you & we can cover the cardiac cycle in depth, if you'd like. You'll be miles ahead of your classmates then and you'll understand the cardiac cycle so much better!