they advertise to you by putting ads on websites that you visit. They keep track and then contact that company and work out a deal with them and put targeted ads on their site/pages.
You can block the ads but its not going to block them from getting more data from you. The same as with the Opt-out option. You opt-out of the ads but not out of the gathering of the data.