You can "unlock" your jailbroken iPhone or iPad to go from one cellular provider to another at will, as long as they're both carriers that use the GSM wireless standard. All you need to do is change the Subscriber Identity Module (SIM) card.
"If you want to use the other carriers, you have to jailbreak your phone," says Tony DeLaGrange, an instructor at the SANS Institute, a nonprofit firm in Bethesda, Md., that provides information security training. "My neighbor jailbroke his iPhone years ago for that reason because he liked T-Mobile."
AT&T and T-Mobile used to lock their handsets for the life of the unit, but now they will gladly unlock an older phone as long as the phone is fully paid for (i.e., the 1- or 2-year contract has expired) and the account is "in good standing" (i.e., you made all the monthly payments).
Unlocking won't work for older Sprint or Verizon Wireless iPhones or iPads, which use the CDMA wireless standard. For those, you'd have to bring your device into the desired carrier's retail store, where a technician could "flash" its firmware to the new network, but Sprint and Verizon Wireless have policies against that.
Things get more complicated with the iPhone 4S and the iPhone 5. Every iPhone 4S can use either GSM or CDMA, but the CDMA radio is switched off on handsets meant for GSM networks, and vice versa. (It's unclear whether any jailbreakers have managed to enable those.) Meanwhile, every iPhone 5 can use GSM, but only some can use CDMA as well.
MORE: A Smartphone Kill Switch Won't Stop Smartphone Theft
Sprint and Verizon Wireless will activate the GSM radio and unlock the SIM card slot on an iPhone 4S if you tell them you're traveling to a country without CMDA coverage. However, both also will block GSM coverage on the iPhone 4S as soon as you return to the U.S.
If you have a Sprint iPhone 5, you still have to request a GSM activation when traveling. However, Verizon Wireless ships all its iPhone 5 models with the SIM card slot unlocked, even for U.S. GSM networks. This means that when your Verizon Wireless contract is up, you can painlessly switch to AT&T or T-Mobile while keeping the same handset.
American users shouldn't forget that if an iPhone or cellular-enabled iPad is less than 2 years old, its owner is probably still subject to the carrier contract he signed when he got the device. Early-termination fees can be hefty, making switching carriers economically unwise.