A new feature in Pokémon Black and White is shaking grass, swirling dust, and bubbling water. These spots appear at random as you walk around an area, and they contain a different type of pokémon from the usual types that you would find in that area. Sometimes the pokémon in these spots are quite rare, so read below to find out how to cause shaking grass to appear, as well as swirling dust and bubbling water.
Shaking grass spots will randomly appear as you walk around an area. The shaking spot seems to appear near where you are walking. Therefore, to make shaking grass appear, walk near grass. Similarly, to make swirling dust appear, walk around in a cave, and to make bubbling water appear, walk near water.
There seems to be a random chance of a shaking grass appearing with each step you take. Therefore, the more steps you take in a short amount of time, the sooner you will encounter shaking grass. Ride a Bicycle near grass to make shaking grass appear more frequently.
Unfortunately, if you encounter a wild pokémon before you reach the shaking grass, then the shaking spot will disappear and you will have to walk around until you find another shaking grass spot. This also applies to swirling dust and bubbling water.
No, using a Repel does NOT prevent shaking grass. I have confirmed this by using many Max Repels in Wellspring Cave and riding around on my Bicycle. Swirling dust appeared many times even while the repel was in effect, and one of those swirling dust spots was a wild Drilbur.