A rate "lock" or "commitment" is a promise from the lender to set a certain interest rate and a certain number of points for you for a specified period while your application is processed. This saves you from going through your whole application process and learning at the end that the interest rate has gone up.
While there can be a choice of rate lock periods (from 15 to 60 days), the longer spans are generally more expensive. The lender can agree to freeze an interest rate and points for a longer period, such as sixty days, but in exchange, the rate (and sometimes points) will be higher than that of a rate lock of a shorter period.
In addition to opting for a shorter rate lock period, there are more ways you can get the best rate. The larger the down payment, the lower your interest rate will be, since you will be starting with more equity. You can pay points to reduce your interest rate over the loan term, meaning you pay more up front. One strategy that is a good option for many people is to pay points to reduce the interest rate over the life of the loan. You'll pay more initially, but you will come out ahead in the end.
Do you have a question regarding a mortgage program?