Most suspension forks will come with ‘lock-out’ – a little switch at the top of one side of the fork which essentially turns off the suspension. This is great for cycling uphill, or if you are cycling along the road.
Turning the suspension off means all your pedal power goes into driving the bike forward, rather than some getting absorbed into bobbing suspension.
Some bikes, particularly those toward the higher end of this price range, come with three settings that allow you to set the suspension for the type of terrain you are riding on.
There will usually be a setting that locks the suspension out completely for climbing, a descend option that has it open completely, and a trail setting which is handy for trails where you’ll be climbing and descending frequently in short bursts.
It partly locks it out, so you have some but not all the travel.