Like all other GSM phones, an Apple iPhone has a SIM card in it. This can store your text messages and contacts list, but most importantly it is used to keep the information about your phone number and network service provider. In order to change your service provider, you will need to change your SIM card.
Identify the slot where your SIM card is stored in your iPhone. On the upper part of the unit, there are two distinct ports located near the phone's power button. The small round jack is for the headsets, while the elliptical port between the headset jack and power button is the SIM card slot. At the end of this slot, you should notice a very small hole. Inside this hole is the slot's ejection button.
Use an unfolded paper clip or any thin wire that is small enough to fit into the SIM card slot's ejection button. Insert the paper clip into the slot and the SIM card will pop out.
Gently pull the SIM card out of its slot and replace it with your new network's SIM card. Once done, gently reinsert the panel until you feel that it is locked in. Turn on your phone and you will see the name of the new network at the top of the phone.