First, enable Find My iPhone. In a web browser, log in to iCloud and select All Devices, choose your device, then select Erase iPhone to remotely wipe your iPhone.