This is done using the Find My feature in iCloud. It enables users to find their either lost or misplaced iOS devices.
How To Find Your iPhone On A PC
Log in to your iCloud account on your PC and once in, click on the Find My iPhone icon.
Wait a moment as your iPhone gets located. A map will appear with green dots showing devices found that are switched on and signed in to your iCloud account via Wi-fi or a cell network.
Click on the All Devices option at the top of the map to choose your iPhone from the drop down list.
You can now put it into Lost Mode or erase it. You also have the option of playing a sound to locate the phone.
If your iPhone is offline, you will be given the option of getting a notification once it comes back online. Just check the box provided for this.