A rate "lock" or "commitment" is a lender's promise to lock in a specific interest rate and a certain number of points for you for a specified period of time while your application is processed. This means your interest rate will not grow during the application process.
Rate lock periods can vary in length, anywhere from 15 to 60 days, with the longer ones usually costing more. You can get a longer period for your lock, but in doing so, will probably have a higher interest rate than you would with a shorter rate lock span of time
There are more ways to get a better rate, besides agreeing to a shorter rate lock period. A bigger down payment will result in a lower interest rate, because you will have more equity from the beginning. You can pay points to improve your rate over the life of the loan, meaning you pay more up front. 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'll pay more initially, but you will come out ahead, especially if you keep the loan for the full term.
Do you have a question regarding a mortgage program?