What liquidity is
When a token trades on a DEX, it trades against a pool holding both the token and something valuable. Whoever deposited that pair holds "LP tokens", a receipt that can be redeemed for the contents of the pool.
Whoever holds the LP tokens can withdraw the pool. If that is the token creator, they can remove everything backing the price at any moment. That is a rug pull, and it is the most common way people lose money on new tokens.
What locking does
Locking sends those LP tokens to a contract that will not release them until a set date, or burns them outright, so nobody can ever redeem them. Either way the pool cannot be withdrawn by the creator.
On a graduated bonding curve this happens automatically as part of graduation. Nobody has to be trusted to do it, and it cannot be skipped.
What it does not protect you from
Locked liquidity does not mean a token is safe. The creator may still hold a large allocation of the token itself and can sell it into the pool, which crashes the price without touching liquidity at all.
It also says nothing about whether the project is real, whether the team exists, or whether anyone will still be buying tomorrow. It closes exactly one attack. Worth checking, but treating it as an all-clear is a mistake.