GSM vs cdma

phone carriers use 2 types of wireless technologies these are gsm &cdma

It is best to think of it in terms of radio.  fm radio stations can be recieved on any fm radio but not on a am radio.  am radios can pick up any am station but not fm stations.  

At&t t-mobile use gsm radios

sprint & verizon use cdma

Any phone once unlocked or flashed will work with its coriponding radio style.