How do I erase my apple ID from my iphone which got stolen?

Well, if you had Find My iPhone enabled, you can wipe the phone as a whole, or add a passcode.

To do this:

  1. Go to iCloud.com/#find
  2. Sign in
  3. Select your phone from the list of devices
  4. Select either 'lost mode' (add passcode and message to lock screen) or 'erase device' (you can't track your phone anymore if you do this)
  5. Follow the steps outlined by the website.

In addition, Find My iPhone will show you the GPS location of your phone, which will help you track it. It cannot be disabled without your Apple ID password, and your phone cannot be wiped with it enabled.

If you choose to wipe your phone, nobody will be able to use it without your Apple ID email password

Finally, if your phone is offline, these options will be applied as soon as the phone connects to a network.

I'd highly suggest adding a passcode to your new phone.