A rate "lock" or "commitment" is a lender's promise to lock in a certain interest rate and a particular number of points for you for a certain period during your application process. This means your interest rate cannot go up during the application process.
While there can be a choice of rate lock periods (from 15 to 60 days), the longer ones are typically more expensive. The lending institution can agree to hold an interest rate and points for a longer span of time, like sixty days, but in exchange, the rate (and sometimes points) will be more than that of a rate lock of a shorter period.
There are more ways to get a good rate, in addition to choosing a shorter rate lock period. A larger down payment will give you a reduced interest rate, since you will have more equity at the start. You can pay points to lower your rate over the loan term, meaning you pay more initially. One strategy that is a good option for many people is to pay points to bring the rate down over the term of the loan. You are paying more initially, but you'll come out ahead, especially if you don't refinance early.
Do you have a question regarding a mortgage program?