Audience Manager sets the Demdex cookie to assign a unique ID to a site visitor.
This is set on the first visit on any website which has an Adobe Visitor Id service implemented on their website. So it could be your website or any other. The demdex cookie is set in the third-party, demdex.net domain, which is separate from the website domain.
Attributes of Demdex cookie
The demdex cookie contains a Unique User ID (UUID) as shown in the example below:
Lifetime: The demdex cookie has a time-to-live (TTL) interval of 180-days. The TTL is reset to 180-days upon each user interaction with a partner website. The cookie expires if a user does not come back to your site within the TTL interval.
Opt-out: Audience Manager resets the cookie with a Do Not Adobe Target string if a user opts-out of data collection. In this case, the cookie TTL is set as 10 years.
To understand the working of calls to Visitor Id service and setting of cookies check the Product document: