The overall term for what everyone is describing is "deep foundations". Go deep enough, and sooner or later you'll find adequate support. Most foundations I've dealt with in poor soil rely on driven piles. If you can drive a pile to rock, then your bridge sits on rock, it can't sink through rock. But even without rock, you get friction along the sides of a pile - a longer pile has more friction along its length. You can see this yourself, sharpen a stick and try to push it into the ground, the deeper you go, the harder it is to continue going deeper. Enough piles with enough length and you could support a bridge on thick gravy.
The actual "how they construct it" side is more complicated, there are a wide variety of means and methods, probably too much to go into here. In general, poorer site conditions mean more money for things like temporary works, or more innovative ideas. One of my favorites (that doesn't get used all that often) is to prop up a component on a barge that is filled with water. Float it into place, then pump out the water so the barge floats higher, raising the component to where you want it.