This is a way in which Selenium selects elements, this is similar to fluent API.
It makes easy for the users to read. The parameter you pass into findElement is kind of like a pseudo-selector query, like Jsoup.
For example, if you wanted to select the logo at the top right hand corner of this page, you could do
driver.findElement(By.id("hlogo"));
So the query By.name("q") basically selects element(s) with the attribute, name="abc"