As was recently revealed in a landmark federal investigation and its wake, you don't necessarily have to be actively using Facebook to have it collect your data, so here is a quick rundown of what data it collects from other sites and services that you may use, and how it uses that data. The big common factor between all of these collection cases is simply that the sites and services overtly connect to Facebook in some way, and almost always ask you before doing so. As for how the data is used, that varies depending on what type of connection to Facebook a particular service has, and is usually the same sort of data that's collected while you're using Facebook.
The first and most obvious type of connection is sites that have Like and Share buttons built in. These buttons perform core Facebook functions right from another site, and require users to log into Facebook in order to work. Obviously, anything you Like will be added to your Like list, and anything you Share will end up on your page. There is also Facebook Login, which lets you log into some games, sites and apps with your Facebook credentials. The amount and type of data collected will vary depending on what game or app you're using, and what permissions you grant it. Facebook Analytics lets site owners use Facebook to analyze their site's traffic, along with other stats like hits on their site's Facebook page if one exists, and the data collected is mostly anonymized and all aggregated. These sites will give Facebook your OS and browser, along with a unique identifier so that Facebook Analytics can tell the difference between repeat visitors and unique ones. If you have a Facebook account, the analytics program can also add demographic information like your gender, age, and region to an aggregated data set provided to the Facebook Analytics customer. They don't know who you are specifically, but they do know, for example, that an Android user living in the United States is a first-time visitor to their site. Facebook Pixel, the ad measurement platform, collects no personal data, and only tells an advertiser how many impressions and interactions an ad is getting. Finally, the Facebook ad platform essentially allows your Facebook ad profile to follow you to other sites, which means you'll see the same ads on Facebook-enabled pages that you would see on Facebook.
Facebook's data collection and sharing practices have been called into serious question following the Cambridge Analytica scandal, prompting the service to publish a number of transparency reports that tell users what data is being collected in what ways and how it's used. In the coming weeks, it's likely a safe bet to expect more reports of this type. Policy changes concerning data collection on Facebook and partnered sites and services is not quite as likely, but certainly a possibility.