The answer is obvious. We do it whenever we step in mud or wet sand. The dinosaur steps in mud and leaves behind a footprint. However, in the dinosaur's case that footprint became a fossil... well actually each footprint often becomes two fossil footprints. Both fossils come from the one footprint. That's what you see in the above photo. Both of those fossil dinosaur tracks came from the same footprint. Notice how they are mirror images.
Here's what happens: the dinosaur steps in the mud and leaves a footprint. A new layer of sediment is deposited, filling in and covering the footprint. The sediment turns to stone. Then, when the rock is split open, the bottom half is the depressed footprint made directly by the dinosaur's foot. The top is a natural cast, a raised impression of the footprint. Both are considered original fossil footprints.
Impressed / Raised Tracks
The above image is a sketch showing the two tracks, with the upper raised track lifted off and set to the side. There you have it. Two fossil dinosaur tracks from a single footprint.
Sounds simple, but real-life is more complicated. For example, in my example the rock split exactly where the dinosaur's foot stepped in the mud. This is called a true print. But the rock does not always split where we'd like it to split. First, there is no way to see inside the rock to know in advance if there is a dinosaur track and where the rock needs to be split to reveal the track. Secondarily, the rock will only split at a weak point, such as where there is mica or a biofilm.
The Rock Splits Where There Is Mica
The tracks in our museum are in a sedimentary rock known as shale. In this case the shale will split where there is mica. The above photo shows a close-up of the edge of a slab of shale and you can see a crack. If we wanted to see what was inside this piece of shale we'd tap a wedge into the crack and gently split the rock. This rock will not split anywhere else. Only where it has been weakened by mica.
Notice in the sketch (above) that the layers of sediment beneath the footprint are bent, taking on a less distinct impression of the footprint. The footprint impression goes deeper than the layer of sediment the dinosaur's foot touched.
Dinosaur Tracks - Underprints
If the layer of mica is in a layer below the layer the dinosaur's foot touched, the rock will split at that lower location. This reveals a less distinct impression of the footprint called an underprint.
Here is another sketch to show how an underprint is revealed. Underprints have less detail than a true print. While a true print may clearly show foot pads and skin impressions, underprints do not have much detail. At times they may retain the impressions of all three toes and the claws, but in other cases the underprint may be barely recognizable as a dinosaur footprint.