How do i replace an apple ID on a used iPhone 4? I have given my dad my old iPhone 4, and I bought a new 4S. He put a new sim card in and used the phone but now 'his' contacts have appeared on my new iPhone i.e. the old phone retains my apple id. 
How can I 'erase' my apple id from the old iPhone and reinstate it with my Dads apple id ?
Important to note that there are two apple IDs that can be linked to phone.   One for App Store purchases and one for ICloud.   Just remove account from iCloud menu and settings and add the account to new phone.  Best to make an Itunes backup of old device before you do that.

If you want to clear phone going to your dad can also Erase all Content and Settings in Reset option of the General Settings menu.  (After backup and checking that everything you need is on new phone)