if you are using a major carrier on the phone but have a different major carrier then you can buy a unlock phone code but if the SIM itself is locked on the phone then you will have to call the manufacturer and get them to unlock the SIM.
hi it will be helpful for me to guide you the exact place if you had specified the country from where you brought the mobile and the network provider name to which your mobile is locked .however you can use codes to unlock your mobile.you can purchase the codes from here prounlcoking here they render the unlock codes for all gsm mobile models along with the instructions about how to use the codes in your mobile.