Hello,
You have a phone that was previously used on a contract, like with ATT, Verizon, T-Mobile etc.. When you buy a phone from them, they lock down the phone so that you can only use it with their service for what normally is- a 2 year contract. If you want to be able to use the phone with a different service, you will need to enter an Unlock Code.
Sometimes you need to pay to get the phone unlocked, but most of the time you can contact the service provider for your cellphone, and they will give you the unlock code.
Good luck,