Can someone tell me what is the frequency of the sound waves? Is it the number of compression or rarefaction going through in a second or the number of vibrations of the particles of the medium through which the sound travels per second? Are they the same thing? If so, how? I'm in 10th grade so please use simple language and less technical terms
When sound travels through air, the frequency refers to the compression and rarefaction, not to a vibration of individual molecules.
The particles in the air are moving and colliding with each other at random. Typically an individual molecule might move at around 500 metres per second and collide several times per microsecond, so the motion is fast and chaotic. You can think of the motion due to sound to be a superimposed movement on top of the random movement of individual molecules, much as the current in a river is an overall movement quite distinct from the random motion of the individual water molecules.
I'm trying a slightly different angle here.
Marco Ocram is correct that air molecules in a room randomly bounce around at pretty high speeds (depending on temperature). That has nothing to do with sound and any sound that happens is simply overlaid over this basic movement.
Sound DOES involve air movement though. Sound is basically small pockets of air wiggling back and forth. When adjacent pockets move toward each other the pressure increases, which in turn pushes them apart again. A change in pressure creates movement and a change in movement creates pressure. This back and forth is what makes a wave happen.
The velocity of these air pockets is well defined. For sound pressure of 90 dB the air pockets move with a speed of about 1.5mm/s (in free air without any surfaces nearby).
Frequency is simply how often per second they wiggle back and forth. If they move back and forth 1000 times per second, the frequency is 1000 Hz or 1 kHz. The frequency is always the same for the wiggling and the compression/refraction cycle.
Many textbooks actually ascribe the movements to the individual air molecules, which is technically not correct since the movement of an individual molecule is dominated by its thermal motion. However, the image of "air particle moving back and for" is a very useful description of what's happening. See for example: https://opentextbc.ca/universityphysicsv1openstax/chapter/17-1-sound-waves/