The act of locating something, of finding or defining the location of something, is a basic idea of modern science. In physics to say what "to locate" or "location" means, we must explain with clear talk how we do the job of locating something.
For things about our size, we generally use two beginning points that everybody knows about, and then we measure from those points to the thing we want to give a location. We might start with the Plymouth Rock and the Blarney Stone. We could then say, "Captain Smith's ship is 1400 miles from Plymouth Rock going toward the Blarney Stone." Or, in another case we might say, "Captain Jones's ship can be found by drawing a line from Plymouth Rock to the Blarney Stone, finding a point 700 miles along this line from Plymouth Rock, taking a left turn of 90° upon reaching this point from Plymouth Rock, and then traveling an additional 90 miles.
If we have some good way of knowing compass directions, we can say something like, "Go three miles north of that big white rock over there and then go two miles east from that point. That is where I put the gold."
Finding the location of something is ordinarily done by seeing it somewhere, hearing it somewhere, feeling it somewhere, etc. Sometimes we know where something is by looking at a photograph, finding it with radar, or pinging it with sonar.
It is much more difficult to locate an electron, a photon, or anything else about that small. We may construct a light source that only makes one photon at a time. We can aim the light source at a piece of photographic film, let the light source make one photon, and then develop the photographic film. If we had very sensitive photographic film that could be darkened by only one photon, then we would find a tiny speck of silver where the photon ended up. A silver atom is much larger than a photon, so there would be some fuzziness about where the photon ended up, but people probably would agree that the photon must have ended up somewhere within the target formed by the silver atom. However, all we can say is that the photon must have been at that point when it ended its existence. When a photon is absorbed by an electron it gives its energy to the electron and disappears. So when it was briefly at some definite place it immediately lost all of its motion.
Another way to locate a photon is to make it go through a small place. Knowing when the light source sends out a photon, and knowing the speed of light, we can know when it must be going through a hole in a plate put in the center of its path to the film. We can gradually get closer and closer to finding out exactly where it is in the middle of its flight. However, the path that it will take from there on becomes progressively wild. That is because when a photon goes through a hole like that it experiences diffraction.