A hard lock genuinely prevents redemption for the term, often one to three years. A soft lock allows exit but charges a fee, commonly 2% to 5%, which is usually paid into the fund for the benefit of remaining investors.
The point is to match the liquidity the fund offers with the liquidity of what it owns. A fund holding positions that take months to exit cannot honestly promise monthly redemption, and a mismatch is what forces fire sales that damage everyone in the fund.
Longer locks are sometimes exchanged for lower fees. Whether that trade is worthwhile depends on whether the investor might need the money and on how much of the strategy's return genuinely comes from an illiquidity-premium rather than from leverage.
Related: redemption-gate, illiquidity-premium, side-pocket, hedge-fund, interval-fund, liquidity