There are many species of bird known for attacking their own reflections in mirrors and windows because they believe they are seeing a rival bird on their territory, which they will then defend. Some birds have even been known to injure themselves in the ensuing fights!
Sometimes the birds are seen to be simply tapping the window rather than attacking it. In these cases, many believe the bird is just curious and confused by the invisible glass.
One of our most aggressive birds, the Robin, rarely attacks reflections. The reason for this is that they defend their territories by finding a dominant position, such as a higher perch, and of course the reflection eventually disappears!
There is no easy way of preventing these attacks other than by covering the window or mirror on the outside with something that is non-reflecting, such as netting or newspaper.
Many birds are injured through collisions with windows. This is because they see a reflection of what is in front of the window, such as sky or landscape, and believe they can fly straight on, or because there is another window or a mirror on the opposite side of the room that allows them to see straight through.
Frequently, the bird simply bounces off and although a little stunned will fly off somewhere to recover. Some knock themselves out, but sadly some die later from internal injuries or are killed instantly. In most cases, the only evidence we have that a bird has flown into a window is hearing the "bang" as it happened or seeing an impression of the bird on the glass, that is produced from its feather dust. If you do find a bird that has knocked itself out, place it somewhere safe from cats, etc., and if it appears to be injured then you may need to care for the bird.
A common solution, albeit one that has mixed results, to prevent the birds from flying into the window is to affix a silhouette of a bird of prey to the inside of the glass, the intention being to frighten the bird away before it flies into the window. You can either make these silhouettes yourself or buy them from some shops, such as RSPB Gift Shops, bird food suppliers and some garden centres.
An alternative deterrent is to hang a sun catcher, dream catcher - or something else that glistens in the sunlight - in your window; these seem to be quite successful and are less displeasing to the eye than silhouettes.
Some people have successfully deterred birds from flying into their windows by hanging several lengths of string outside from the top of the window.