VZW and Sprint work with IMEI/ESN that have to be registered in their database.
Some phones (I am not sure about iPhones) but like a Galaxy ect could be flashed to work from Sprint to Verizon.
Most CDMA carries could pick up any CDMA phone, but the issue is the prl files have to match the network for the phone to work on the network.
That is only regarding voice and text. For data it is a lot more complicated.