It's a compulsive behavior different from preening. While preening, a bird uses its beak to clean, waterproof, smooth, and arrange its feathers and to remove the sheaths through which new wing and flight feathers emerge. It may use its feet or claws to reach the feathers on its head, or rub itself occasionally on a perch or cage, or some other element in its environment. Birds also groom each other. All that is perfectly normal.
Birds also molt, the process by which old feathers are replaced with new feathers.
Your bird's molting schedule will vary based on its species and on the climate and environment in which it is kept. In temperate climates, you will usually find a few feathers here and there throughout the year, with one or two heavy molts where your bird sheds lots of feathers all at once. This, too, is normal and all part of your bird's innate survival mechanism. Birds have two to three thousand feathers, and a healthy bird will keep them all in magnificent condition. In the wild, feathers are critical not only for flight, but also for temperature regulation and courtship displays.