What you think of as sound is actually air molecules colliding with each other, knocking into one another and transmitting the motion from molecule to molecule, until some of those molecules hit your eardrum. The source of the sound vibrates and sends repeating waves of air molecules out at specific intervals. This isn’t the same as wind. As Indiana University-Purdue University Fort Wayne notes, bands of molecules are compressing and expanding, and it’s that compression that the molecules are transmitting. Some of these waves are extremely thin and repeat rapidly; these are high frequencies. Others are thick, slow waves; these are low frequencies. What you hear as volume is the amplitude or power of the wave. As the molecules travel toward you, they hit obstacles like walls and furniture. Sometimes the obstacle is dense enough to stop the molecules, but other times the waves slam into the object, transmitting some of the motion to the molecules in that object and letting the sound transfer past the obstacle. This is why you hear bass through a wall more often than you do treble frequencies.
Carpet can deaden sound if the carpet is thick enough and the sound waves weak enough. The thicker the carpet, the better the chance you have of blocking the waves; the weaker the wave, the better the chance that the carpet will stop at least some of it. As a result, thin carpet isn’t going to stop a lot of loud bass sound, but a thick carpet could block quite a lot of a whisper. Sound waves can be torn apart too, in a way, by objects that are uneven enough to mess with the waves’ ability to stay together. If a wave hits this rough patch of carpet, for example, part of the wave might advance while another part doesn’t.
Unfortunately, there’s no way to quantify how much sound a carpet will deaden. Carpet can do only so much to deaden sound when you take the thickness of the underlying floor, your own and your neighbor’s sound sensitivities, and the type of sound into consideration. Thin carpeting over a thick floor and a very thick carpet pad may do a better job of deadening sound than a thick carpet with no pad. Neither could be good enough if you are particularly sensitive to sound and can pick out even the smallest vibrations. There are too many variables to effectively guess how much sound will get past carpet.
Adding carpet if you are trying to muffle sound is still an option. If you can’t install a permanent carpet, large rugs or just laying loose carpet on the floor as if it were a rug could work -- just ensure the carpet or rugs have no-slip backings or liners. Don’t be surprised, though, if you can’t deaden all sound. Depending on what you’re trying to block, carpet could simply not be enough. Look into specialized soundproofing layers and foam blocks that audio production studios use; these are available online from audio and visual supply vendors. If you are upstairs, walk in slippers instead of hard-soled shoes. Consider wearing hearing protectors to cut out noise if it still bothers you.