SIM cards only work in GSM phones. CDMA phones, the other major type of phone, do not have a SIM card slot so are not compatible with SIM card use.
Some phones are carrier locked and will only work with the SIM cards of certain phone companies. Also, micro-SIM and nano-SIM cards have been created that only fit in phones that are designed to be compatible. The main two US cell phone networks that use GSM phones are AT&T and T-Mobile, while CDMA phones are featured on Sprint and Verizon networks. Since these GSM and CDMA phones use completely different technologies, they can only work with service providers that use their respective technology.