>>1499716An image is just a file, a bunch of bits.
You can run an algorithm over it that calculates a fixed size number from any sized input. This reduces the possible space from potentially infinite (if image upload size wasn't restricted) to 2^[number of output bits], in this case 2^192.
By indexing this number for each image you make EXACT duplicates easily searchable. The system has no idea WHAT those images are, but it knows they are the same file.
Of course even though 2^192 is a massive number it CAN in fact happen that two different images produce the same result, that is called a COLLISION, but with the massive size of possible results this risk is regarded as irrelevant.