To unlock your iPhone from its carrier, you'll likely need to contact your carrier directly to cancel your contract.
If you need to find out your iPhone's carrier without a SIM card installed, you can do so through the Settings app.
If you buy your iPhone from a carrier, or elsewhere on a subsidised contract, then it may be ‘locked’ to that carrier – meaning it won’t work if you try to switch to a physical or e-SIM from another ...