Thoughtworks interview question

How does the selenium Webdriver work?