There are a variety of types of aerial locomotion in the animal kingdom, including parachuting, gliding, flying, and soaring, which all require distinct adaptations. Many microorganisms can "fly" because the physics of the Earth's atmosphere allows some tiny particles to stay aloft without lift.
True flying animals have evolved independently four times in the history of life on Earth: in insects (Early Carboniferous, 350 million years ago, Order Protodonata), pterosaurs (Late Triassic, 228 million years ago), birds (Late Jurassic, 155 million years ago, Archaeopteryx), and bats (Early Paleocene, 55 million year ago, Onychonycteris). So the gaps between the evolution of flying animals was 122 million, 73 million, and 100 million years respectively, for an average of about once every 100 million years.
Insect flight may have actually evolved much longer ago, in the Devonian Period. The earliest insect fossil, Rhyniognatha hirsti, estimated at 396-407 million years old, had dicondylic mandibles, a feature associated with flying insects. Thus, this insect may have had wings, or evolved from those that did. At the time, insects were the only non-microscopic terrestrial animals, and had a full ecosystem to diversify into.
Flying animals evolve incrementally from gliding animals. Gliding has independently many more times than flight, and includes animals as diverse as flying squirrels, flying frogs, Draco lizards, and various small mammals. For a flying animal to successfully evolve, it has to minimize its weight, develop wings, and the muscles to use them. Flying can be quite a beneficial adaptation, as it allows animals to cover far more ground and easily avoid non-flying predators. Post-insect flying animals primarily evolved to exploit the massive number of flying insects as a largely untapped food source.
Flying animals range greatly in size, from the miniscule 0.139 mm fairyfly, a wasp, to the massive extinct pterosaur, Quetzalcoatlus, with a wingspan of 10-11 meters (33-36 ft), about three times longer than a typical automobile. Until recently, the largest known flying animal was Pteranodon, a pterosaur with a wingspan of up to 7.5 m (24.6 ft). Pteranodon was thought to be about as large as the biomechanics of flight would allow, but this barrier was shattered by Quetzalcoatlus. There may be even larger flying animals in fossil strata, although it is admittedly hard to imagine.