An iPhone 4 can be unlocked to work on another carrier. The current wireless carrier will need to provide the unlocking service.
Unlocking an iPhone 4 requires a customer to contact his current cellular carrier and request the service. After a few days, the cellular carrier should confirm the phone has been unlocked. Once this happens, remove the old SIM card and put in the new one, then back up, erase and restart the phone. Following these steps will ensure the phone is unlocked and ready to be used on a different carrier.
If these steps do not work, contact the previous cellular carrier to make sure the unlock has been completed. Restoring the phone from a backup may also help.