The front forks - the things that hold the front tyre in place - have suspension on them, to absorb some of the shock from the bumps and ruts on the trail/road. When you are not on a bumpy track, you don't want the shock absorbers to be bouncing, as every time you put your weight on the pedal, the first thing to happen is that the front of the bike dips, as the front fork is slightly compressed. This uses up a lot of your hard-to-come-by energy !
Many front forks have a little dial thing that you can turn, which 'locks out' the suspension, so it doesn't 'work' when you are on a harder, smoother surface, like a tarmac road.
Means you can go faster on the road

for the same energy !