A rate "lock" or "commitment" is a promise from the lender to hold a specific interest rate and a specific number of points for you for a certain period while your application is processed. This means your interest rate can't get higher as you are going through the application process.
Although there are various lengths of rate lock periods (from 15 to 60 days), the longer ones are generally more expensive. You can get a longer period for your lock, but in doing so, will most likely have a higher rate than you would have with a shorter period
There are other ways to get a good rate, besides going with a shorter rate lock period. A larger down payment will give you a reduced interest rate, since you'll have more equity at the start. You might opt to pay points to improve your rate over the term of the loan, meaning you pay more initially. One strategy that makes financial sense for some is to pay points to improve the interest rate over the life of the loan. You will pay more up front, but you'll come out ahead in the long run.
Do you have a question regarding a mortgage program?