You can look up information about your phone, be it an Android or an iPhone by going to your phone screen, bringing up your number pad and typing in *#06# as though you are dialing someone’s phone number. Once you hit the last #, a number called an IMEI number will come up. Write this number down and visit www.imei.info. You will have the option of entering your IMEI number into the website and it will provide you with basic info about your phone. Carriers have certain operator codes across the world. When you enter your imei number, you should be able to determine which carrier (if any) the phone is locked to.
Alternatively, you can swap out your sim card for a new one, or try a friend’s sim card. If your phone works, it is unlocked, if not, it is not unlocked.
Finally, you can call the company you are using as your cell service provider and ask them if the phone is locked to a specific carrier.