Keeping the feathers clean and in top condition is crucial to birds, if they are to function well and enable them to fly. Nearly all birds take a daily bath, if they have the opportunity. This is to rid the feathers of dust.
Bathing involves fluffing the feathers and vigorously beating the water. At the same time the head is dipped into the water regularly. The bird then shakes off the excess water and flies off to dry. The feathers need to be preened. Each feather, particularly the wing feathers need to be passed through the beak so that they are cleaned and the separate filaments put back in place.
If water is not available, some birds like the Eurasian Tree Sparrow (Passer montanus), will take sand or dust bath (all three images above). They roll about the loose sand or dust and shake vigorously about. The sand or dust particles are believed to absorb excess preen oil as well as remove dry skin and ectoparasites. These include lice, mites, fleas, ticks and what have you that damage the feathers or even suck the blood of the birds. Evidence of dust bathing is the presence of bowl-shaped hollows on the dry ground.
Sunbathing is another method indulged by birds. This is what the Peaceful Dove (Geopelia striata) is doing in the above image. They lie down with their wings outstretched. The sun is thought to straighten the feathers and at the same time spread the preen oil throughout the feathers.
Top image of sparrow taking a dust bath courtesy of Fuhai Heng. Other images by YC.