I have read this question here: How Do Internet Advertisers Use Third-Party Cookies? on how third-party tracking cookies work, but am still very confused. I don\'t understa
First, cookies are set and retrieved through HTTP headers. If your browser sends a request to http://example.com, then the response might come back with a header that says Set-Cookie: foo=bar. Your browser stores this cookie, and on any subsequent requests to http://example.com, your browser will send foo=bar in the Cookie header. (Or at least until the cookie expires or is deleted.) The browser sends the foo=bar cookie with any request to http://example.com, regardless of who initiated the request or what the context is. If http://example2.com contains the tag , then the browser will send the cookie 
foo=bar when it fetches http://example.com/img.jpg, even though http://example2.com is responsible for the request being sent.
So, if website A contains an ad that is served by website B, then website B can set a cookie in your browser. For example, maybe website A uses , and then website B will see the referer in the query string.
Does that help? Are there particular parts of the answer you linked that don't make sense to you?