The gizzard works by contracting and grinding the stones and gravel against the food. This creates a grinding effect that breaks down the food into smaller pieces, which can then be easily digested and absorbed by the bird's body.