I am looking to buy an iPhone 4 from the secondary market. I currently have an iPhone 3GS. Can I just replace the sim on the new iphone with my current sim? Or is there something else that I need to do?
If you want to make your SIM into a compatible iPhone 4 Micro-SIM, you'll need a micro sim cutter. Look these up on ebay in your area. They're as cheap as chips and save you a ton of bother.
Look for DIY ways of making pre-iPhone 4 SIMs into iPhone 4 Micro-SIMs on YouTube. There's video instruction for how to do it yourself
Since the SIM are electrically the same, you could cut the current SIM to allow it to fit the iPhone 4 slot. Otherwise, you'll need to contact your carrier.
They will be able to assist you in ensuring the SIM cards match your account. Apple (and this forum) can help with moving the content, but only the carrier can manage the database that tracks which SIM and which phone belong on which account.
Often it's as simple as getting a new SIM card of the right physical dimensions and placing it in the device, but explaining why you want a new SIM to the carrier may speed things up.
Not sure if you have it sussed by now, but I'll give you a quick run down:-)
All of the info on the iphone is stored in the backup file you make in itunes - the iphone stores nothing on the simcard - however if you have a simcard from an old phone you can import your contacts.
So the best way is to make a backup of your 3GS in iTunes and then restore you iPhone 4 in iTunes and restore from backup - then you have exactly the same on both phones and you can erase the 3GS and continue on with the iPhone 4.
Good Luck :-)