A numeric code (password) that prevents a user from accessing certain technical settings of a phone. It is specifically designed to prevent a phone from being reprogrammed to work with a different carrier (service provider).
MSL is relevant only to certain types of phones, such as CDMA phones. Other types of phones may have a similar type of code that goes by a different name.
This is what is usually meant when a phone is referred to as "locked". There are also "unlocked" phones that can be reprogrammed to work with a different carrier.
The reason for this system is the way phones are often sold. Many phones are sold below cost, (at a loss to the carrier,) with the expectation that the money will be recouped in the cost of the monthly service plan. The up-front loss that is later recouped is called a Subsidy.
For this to work financially for the carrier, the user must not buy the phone and then use it with a different carrier. The MSL makes that nearly impossible.
Unlocked phones are ususally much more expensive than locked phones, because there is no subsidy to offset the cost.