A Verizon phone can work when using a SIM from a T-Mobile account. The model of phone and the carrier that one is switching to will determine whether moving SIM cards will work properly. Some cards are not compatible with particular services or may require special software on the phone.
Both the T-Mobile and Verizon Service websites have a listing of what devices will be compatible when switching services. With Verizon in particular, 4G services are locked to specific devices, and swapping SIM cards to an incompatible device will not work. SIMs, which stand for subscriber identity modules, share not only account information with the cellular network, but what services the phone has access to.