Does an locked verizon iphone 4 work with a t-mobile sim card?

I want to buy a locked verizon iphone 4 will it work with a t-mobile sim card when I unblock the phone

Are you referring to the Verizon (CDMA) iPhone 4, or the CDMA and GSM iPhone 4S?

The Verizon iPhone 4 will not work with T-Mobile, as T-Mobile is a GSM carrier while Verizon is a CDMA carrier, and the two technologies are not compatible with each other.

If you are referring to the iPhone 4S, you would need to have the phone unlocked which is only possible if the phone is on an account that in good standing (off contract and paid in full). If it is still locked, it will not work on T-Mobile.

Also, the phone must have a clean and clear serial number (IMEI) if it is not clean and clear, T-Mobile can't activate it on their network.

No.

The Verizon iPhone 4 is a CDMA only device (it does not have a SIM card slot).

There's no way to make a CDMA only device work on GSM networks (T-Mobile uses GSM).