Unlocking your device from your carrier (making it so you can move from one carrier to another with the same device) isn’t as popular as it once was, and a lot of lines get pretty blurry. I’ll clarify things for you here.
Unlocking vs Jailbreaking vs Rooting
Rooting is an Android process where through some intensive technical means you gain the ability to use resources at the root level. So you control everything about your device now. You can flash custom ROMs (operating systems), download some very helpful tweaks, and a few other handy things. Downside: you need to unlock your bootloader normally which voids your warranty. Not recommended unless you know what you’re doing.
Jailbreaking is the process of modifying the system software on your iOS device to set it free of the plain limits Apple imposes on you. You can change your device font, icons, add special lock screen tweaks, and all sorts of interesting things. But once again, you’ll lose your warranty AND you’re not able to update your phone when Apple updates everyone. You have to restore your phone, update, then rejailbreak when it is able to be jailbroken again.
Unlocking is when your carrier deems you to be eligible for device freedom. Say I have an iPhone on AT&T and I want to switch to another GSM carrier. After I serve my 2 years, AT&T can consider unlocking my phone off their network so it can be used on another carriers network.
That’s some simple differences between those three most commonly confused terms. I might update this later with edits.