Many species of birds have been known to swallow stones after they have eaten. Typically those that eat tough berries or leaves are the most prolific. They often need to eat the stones because they aid with the digestion of their foods. This is because of the fact that they have no teeth to crush their food into smaller pieces and because they often swallow their food whole.
In most animals the teeth crush the food that they are eating down into small pieces so that digestion is a lot easier. Rather then the body having to try to digest a tough coating that a certain food has, for example a nut, a chewed up nut is a lot easier to break down. The same principle is why birds eat stones. Because they lack any apparatus to chew their food before digestion, they need some way of softening it up. Things like nuts, berries and leaves usually have a hard outer layer because they need to survive outdoors. This can leave them difficult to digest unless their outer layer is broken first, which is where the stones come in.
In the stomach of the birds, the food and stones grind together by way of muscular contractions. This causes the food to be broken down, where it can be easily digested. The stones are then passed out though the digestive system and come out with the feces. The birds will then eat fresh stones every time that they have eaten some food. If any stones get stuck in their digestive tract, as they sometimes do, the are usually harmlessly worn away over time. The inside walls of bird digestive tracts are very tough, and even a very sharp stone of piece of metal will do them no harm and will eventually either pass through or be worn away.
It has been theorized that several species of birds also use eating stones or gravel as a way to attain ballast when on the water. Water birds and several species of diving birds will eat stones before taking to the water sometimes, which seems to give them better balance in the water.
This theory also holds to scrutiny because most of what a diving bird or a water bird would eat would be soft and easy to digest, rather then the harder leaves and berries that most birds eat. Small insects and worms in the water wouldn't need to be crushed down because they are small and soft already, meaning that the stones wouldn't be needed for digestive purposes. They also contain none of the tough cellulose that many species have trouble digesting naturally that is present in leaves.
Carnivorous birds, such as eagles or owls don't tend to swallow stones. This is because the stomach acid that they produce are a lot stronger then in most species of bird. They also posses talons and sharp beaks capable of tearing their prey into smaller pieces prior to digestion. This means that when they eat a small animal such as a mouse, it is more or less dissolved by their stomach acids alone.
Not only this but because meat is compromised mainly of protein it is easier to break down that for example leaves which are usually comprised of cellulose. Also they have a larger digestive tract that more species of herbivorous birds, meaning they can fit larger objects through their body. The end result of which is that there are sometimes bones and traces of fur in their feces.