It can only be used in tall grass, while on foot. When used, a tune will begin to play, and up to four patches of grass will shake briefly. Upon entering one of these patches of grass, a battle with a wild Pokémon will begin immediately, even if the player is using a Repel. (Source)
But on the bright side, the shiny chance is halved in X & Y, meaning there is a 1/4096 chance opposed to the old 1/8192 chance of getting a shiny Pokemon anywhere.