Do you know about Newton's First Law of Motion ?
It states that an object continues in its state of rest or motion until or unless an external force is applied on it.
The removal of dust out of the carpet is an example of Newton's first law of motion.
Initially, the dust particles are at rest. But when you hit the carpet with stick, dust particles come into motion and gets removed from it.