Scour is the enemy of many bridges, and not just stone bridges, either. The effects of scour are more pronounced on stone structures as they are not a single cohesive mass, but, unlike solid concrete bridges, they rarely fail suddenly without warning. Though there are effective scour remedies available for bridges being undermined, preventing scour is best done at the design stage.
Waterway
Waterway is decidedly a major factor in scour prevention. The reason is simple. If the bridge is too small, the water velocity rises. The faster the water flows, the more easy it is to scour the foundations. For many culvert-sized structures, undermining can be prevented by making the bridge plenty large. It is worth pointing out that even for the most ferocious stream, if a bridge were built with a span big enough that the foundations were set well into the banks, far away from the channel proper, such a structure would be very difficult for the water to undermine.

The main limitations to span length are cost and, in the case of a stone bridge, rise.
Piers
Piers are a magnet for scour, it seems, and with good reason. A pier represents an obstruction in the middle of the stream, around which the water must flow. A pier is almost guaranteed to see some degree of scour, even if minimal, and there are no two ways around it. That said, with the correct design, scour can be mitigated. The piers should be small, with some form of streamlined design. They should also be set deep into the streambed where possible.

All that said, piers should still be avoided where possible; stone arches can be built with very long spans. Again, the limitations here are cost and rise, as well as possible settlement issues for very long spans on softer foundations.
Foundation Design
The best foundation for any bridge is solid rock, and preferably a layer of rock far enough down to be a massive sheet instead of thinner, broken slabs. A bridge built on such a foundation is hard to undermine. Where rock is not available, a stepped foundation is preferred, as such a design distributes weight and provides a layer of scour protection.

When building a bridge that is not on rock, it is advisable to implement a scour barrier above the foundation. A scour barrier can be built of flat sheets of rock, closely fit together, across the streambed for the entire width and span of the bridge.

If a stepped foundation is used, the barrier can be placed on one of the upper steps of the foundation to provide a more durable design that protects the footings. Even were this scour barrier to be dislodged in a flood, the stepped footings below would provide some level of protection until the trouble is rectified.
