When people say a phone is "locked", they mean it is locked to a single carrier. When a carrier sells you a phone for cheap, they don't want you running off and using the phone on another network. So they put on a "Subsidy Lock", which means no other carrier's SIM card will activate the phone.
To unlock a handset, you need the unlock code. It is different for every handset, identified by the IMEI, each phone's unique number.
You can pay someone who can lookup or determine the unlock code from your IMEI number, or you can contact your carrier, who may be able to give you the code if you bought the phone from them, and are a good customer.
Unlocking lets you use other SIM cards in the phone. If you aren't changing carriers or using prepaid SIM cards overseas, you don't need to unlock your phone.
peace,
sam