Thoughtworks Interview Question

How does the selenium Webdriver work?