Tesseract - is an optical character recognition engine with open-source code, this is the most popular and qualitative OCR-library.
OCR uses neural networks for text search and its recognition on images.
Tesseract is finding templates in pixels, letters, words and sentences. It uses two-step approach that calls adaptive recognition. It requires one data stage for character recognition, then the second stage to fulfil any letters, it wasn't insured in, by letters that can match the word or sentence context.