They track you across websites using cookies that respond to their ad code, Google can learn even more about you by triangulating that data. As a result, they know what you search for not only when you use Google but also whenever you browse the Internet.