Geotagging is the adding of GPS location data to digital photos. That way you’ll always know where you took each of your photos.
A GPS device receives signals sent from several GPS satellites and uses this information to calculate its exact position. The GPS then sends the coordinates of its current location to the camera, which in turn stores these coordinates in each photo when it is taken. Alternatively, the GPS logger stores its position every few seconds, with a timestamp so that these points can be matched to photos taken at the according time using synchronization software. Now the position at which it was taken is stored within each photo. In order to visualize this, the photos can be uploaded to a web service such as panoramio.com, where they will be automatically placed on a map.
Details on the methods can be found here.
More possibilties and examples of what to do with geotagged photos can be found here.