A rate "lock" or "commitment" is a lender's promise to lock in a specific interest rate and a specific number of points for you for a certain period during your application process. This means your interest rate will not go up as you are working through the application process.
While there are various lengths of rate lock periods (from 15 to 60 days), the extended spans are generally more expensive. The lending institution will agree to freeze an interest rate and points for a longer span of time, say sixty days, but in exchange, the rate (and sometimes points) will be higher than with a rate lock of fewer days.
There are more ways to get a lower rate, besides opting for a shorter rate lock period. A bigger down payment will result in a lower interest rate, since you'll be starting out with more equity. You can pay points to improve your interest rate for the term of the loan, meaning you pay more initially. One strategy that makes financial sense for some is to pay points to bring the rate down over the life of the loan. You'll pay more initially, but you'll come out ahead, especially if you keep the loan for a long time.
Do you have a question regarding a mortgage program?