This article explains how to remove the SIM card from an iPhone (or cellular-enabled iPad), and provides troubleshooting tips if the SIM tray won't pop out. You'll need the SIM ejection tool that came with your device or a straightened paperclip.
How do I remove a SIM card from my iPhone?
Opening the SIM card slot on an iPhone is a simple process that you can perform while the iPhone is still turned on.
Straighten the long end of the paperclip until it sticks out.
Look on the side of your iPhone and locate the SIM tray. Most recent iPhone models place the SIM tray on the right side of the iPhone, but earlier models place it on the bottom of the phone.