A rate "lock" or "commitment" is a lender's promise to freeze a specific interest rate and a specific number of points for you for a specified period of time during your application process. This saves you from working through your entire application process and finding out at the end that your interest rate has gone up.
Rate lock periods can vary in length, anywhere from 15 to 60 days, with the longer ones generally costing more. The lender may agree to freeze an interest rate and points for a longer period, such as 60 days, but in exchange, the rate (and sometimes points) will be higher than that of a rate lock of fewer days.
There are other ways to get a good rate, in addition to opting for a shorter rate lock period. The bigger down payment you can pay, the better the interest rate will be, since you will be entering the loan with more equity. You can pay points to reduce your rate over the loan term, meaning you pay more initially. One strategy that is a good option for some is to pay points to improve the interest rate over the life of the loan. You will pay more initially, but you'll save money, especially if you don't refinance early.
Do you have a question regarding a mortgage program?