These little balls of sand are formed by soldier crabs scouring the sand during low tide for food.  The little hole is one of their homes that they hide in during high tide