Contacts can be phone or account contacts. Account contacts are stored on Google's server. Phone contacts can be stored on the SIM card or in internal memory, your choice.
Most of everything else is either in internal SD card or external SD card. (Internal "memory" is the memory that apps run in, nothing is stored there after an app finishes running. SD is storage, not memory, in Android terms, and data is stored in storage.
As for your contacts, export them to your SD card and remove the card from the phone. Then you'll have them backed up. If you entered all your contacts under your account (<whatever@gmail.com, usually), you can back that up from the GMail page on the web if you want, but syncing any other phone to that account will sync all those contacts automatically,