It sends a high frequency vibration through the filter stack to loosen any dust sitting on the sensor. Works best if you let gravity help, so do it with your camera pointed down, or at least forward. Not really effective for stuff that's been there for a while, but it's something.
Helps if you also store your gear lens facing down, or at least having the sensor vertical. Never leave the camera lying on its back unless you want gravity to do its work inside.