A footprint is formed when a dinosaur walks through wet or soft mud and leaves an impression behind. The process is similar to how a footprint forms when a person walks through sand or dirt. But for the marks to be preserved, they must be filled with sediments such as sand, mud, and small pebbles and allowed to harden into rock.