Secret of Google’s successful targeted ads

Many of us keep our self logged into our Google account while using Google search engines , so what Google does it shows ads on every website you visit with the ads relevant to your search on Google .

Lets take an example , you were visiting varies job hunt sites using Google.com while you were logged into your Google account for last few days so what Google does it will displays  ads related to jobs on sites which may be  ticket booking site which you go directly without using Google search engines .