A rate "lock" or "commitment" is a promise from the lender to set a certain interest rate and a particular number of points for you for a certain period of time during your application process. This saves you from getting through your entire application process and discovering at the end that your interest rate has risen higher.
Although there are several lengths of rate lock periods (from 15 to 60 days), the longer spans are generally more expensive. A lender can agree to hold an interest rate and points for a longer period, like sixty days, but in exchange, the rate (and sometimes points) will be higher than that of a rate lock of fewer days.
There are more ways to get a better rate, besides choosing a shorter rate lock period. A bigger down payment will get you a lower interest rate, since you'll be starting out with more equity. You may choose to pay points to improve your interest rate for the loan term, meaning you pay more up front. One strategy that makes financial sense for some is to pay points to bring the rate down over the term of the loan. You pay more up front, but you will come out ahead in the end.
Do you have a question regarding a mortgage program?