See "Web Custom Audiences"[0] and "Lookalike Audiences"[1]:
Company X sends event logs to FB whenever anyone visits their website. They don't know who you are, but they pass metadata that helps FB determine who you.
Company X can then specify that their ads should be shown to anyone who visited their site in the last, say, 30 days. This is helpful for businesses who want to follow up with the digital equivalent of window shoppers.
Alternatively, Company X could create a "Lookalike Audience", and have FB show their ads to people who have similar characteristics to their existing site visitors/purchasers, but are different users entirely. This is useful for businesses who want to efficiently find new customers.
Most ads people see fall into one of these buckets.
[0] https://www.facebook.com/business/help/610516375684216?id=24...
[1] https://www.facebook.com/business/help/164749007013531?id=40...