A rate "lock" or "commitment" is a lender's promise to hold a particular interest rate and a particular number of points for you for a certain period during your application process. This means your interest rate can't go up during the application process.
While there may be a choice of rate lock periods (from 15 to 60 days), the longer ones are typically more expensive. The lending institution will agree to freeze an interest rate and points for a longer period, say 60 days, but in exchange, the rate (and sometimes points) will be more than with a rate lock of fewer days.
There are more ways to get a lower rate, besides choosing a shorter rate lock period. A larger down payment will get you a better interest rate, because you will have a good deal of equity at the start. You can pay points to reduce your interest rate for the term of the loan, meaning you pay more initially. One strategy that is a good option for some is to pay points to reduce the rate over the life of the loan. You pay more initially, but you will come out ahead in the long run.
Do you have a question regarding a mortgage program?