I recently replaced my SIM card with a new one because the old card stopped working. I handed over my old SIM to the service representative who gave me a new one and told me that the new SIM will be functional after 5pm. And indeed, at 5pm my number was again functional. But alas! I discovered that I lost my entire contact list with phone numbers, which was stored on the old SIM card. Had I planned better, I would have copied the list from the SIM to my phone. Admittedly, I use a "dumb" Nokia 6070 phone.
Many smart phones save contact lists automatically or even back them up to the cloud. On iPhones, iPads etc. with iOS 5 or later, data can be automatically backed up to iCloud if you enable the Backup option. On Android phones running version 2.2 or later, turn on the automated and free backup to the Google cloud servers. This type of backup helps if even if you lose your phone.
Simpler "dumb" phones require manual backup through the phone's Contacts menu (here are instructions for Nokia phones), by saving the contact list both on the phone and on the SIM card. That way your contact list will remain with you whether you replace the SIM or your phone. But if you lose the phone (with the SIM), tough luck.