I posted this on your other thread, but in the event that you are checking only this one and not the other one...
Welcome to the forums
Initially, this sounds like your contacts are not being synced to Google. By doing so, you can backup your contacts to your Google/Gmail account, so that they may be restored at any time and will probably stay on the phone. To sync your contacts, first enable wifi or data/3G, and make sure that the icon for either of those turns green (it means you're connected to Google's servers) after some time on their own. Then, go to System Settings, Accounts and Sync, and tap on your gmail account. On the screen that comes up from tapping your gmail account, tap Sync Contacts, and they should sync to Google.
Otherwise, if either you cannot sync your contacts or they are stored on your phone, not via Gmail, then go to your contacts (with all of your contacts in it), tap the menu key, then tap Import/Export, Export to SD card, OK, and you now have your contacts backed up to your phone. If ever you lose your contacts again, follow the same procedure except tap Import from SD card, and then choose the file you saved (it's a .vcf), and you'll have your contacts back.