Digital photographs are saved as compressed binary data in files. These files store information about the image like each pixel's color as well as some metadata about the image such as the data and time the photo was taken, what type of camera took the photo, and the location it was taken (if location information is turned on in the camera). This metadata is called Exif (Exchangeable image file format) and is saved automatically by the camera. You can see the metadata by right clicking on an image and choosing Properties/Details.
Location data (if location information is turned on in the camera) is stored as the Latitude and Longitude of where the photo was taken. There are online tools that can show the latitude and longitude on a map. Google Maps allows searches for latitude, longitude.