Marks & Clerk interview question

How does the engine works?