As modern appliances go, vacuum cleaners are fairly simple. They consist of five basic parts: an intake port, where the dirt goes in, an exhaust port, where the sucked-in air escapes, an electric motor, a fan, and a porous bag. That's all it takes to rid your carpets of dust and grime.
When you turn on a vacuum cleaner, the electric motor sets the fan in motion, which makes quite a racket.
With its angled blades, the fan forces air up into the machine. The forward moving air causes air pressure in front of the fan to increase. Consequently, air pressure behind the fan drops. Because air pressure in the space behind the fan drops below the air pressure outside the machine, air from the outside the vacuum cleaner rushes in to equalize the pressure. This is what we call "suction."
This air pressure manipulation results in a constant stream of air moving through the vacuum cleaner. Like flowing water, the air stream rubs against loose dust and dirt. If the debris is light enough, the air flow carries it up towards the bag. As the stream passes through the bag the bits of dirt and dust get caught, filling the bag with gunk your house has collected over the past week.
The more powerful the fan, the stronger the suction, and unfortunately, the louder the noise. But that's a small price to pay for clean carpets.