OCR means Optical Character Recognition. It's the program knowing where to find the neopet on the little "Click to purchase" images. Usually it just searches for the darkest pixel in the image, that goes well 99% of the time.
lol i was wondering how did the program know where's the Neopets when I struggle sometimes to find where's the neopet in the picture