It makes a hole in a suitable rock. If that rock breaks, the Pokémon remains agitated until it locates a replacement.