Geotagging is the task of assigning the geographic position (of capture), called geotag, to the photo. The position may be included in the header as Metadata (e.g. EXIF) of the digital image so that it is stored within the image.
More and more modern and sophisticated cameras and smartphones use Global Navigation Satellite System GNSS receivers für capturing positions with GPS, GLONASS, GALILEO, BEIDOU … or the capturing devices may have an interface (e.g. hot shoe) to use an external GNSS receiver to assign and store the position directly while capturing the photo.
If you don’t have these possibilties of capturing the position directly, you have other possibilities to postassign the position to the image.
When the position is assigned to the photo, many tools support to show it or its position on a map. This is also a modern part of cartography.