A rate "lock" or "commitment" is a promise from the lender to freeze a certain interest rate and a specific number of points for you for a specified period while your application is processed. This keeps you from working through your entire application process and finding out at the end that the interest rate has gone up.
Although there are several lengths of rate lock periods (from 15 to 60 days), the extended spans are usually more expensive. A lender will agree to hold an interest rate and points for a longer span of time, say 60 days, but in exchange, the rate (and sometimes points) will be more than with a rate lock of a shorter period.
In addition to choosing the shorter lock period, there are other ways you can get the best rate. A bigger down payment will get you a lower interest rate, because you'll have a good deal of equity from the beginning. You can pay points to improve your interest rate over the loan term, meaning you pay more initially. One strategy that makes financial sense for many people is to pay points to bring the rate down over the life of the loan. You pay more up front, but you'll save money in the long run.
Do you have a question regarding a mortgage program?