Basically, the image is fed into a program that looks at the image and creates a mathematical model (sometimes called a fingerprint or hash) of the picture (how this is done is way, way beyond ELI5). The model is then compared to other models that exist from previous images that have gone through the same process. If the models are similar enough (say, 90% the same) then the reverse image searcher will display the compared images.
Latest Answers