Advertisers can "purchase a campaign" to run relevant advertising on certain sites. This page (also here) lists all the sites included:
In addition, ads now run on all main Stack Exchange sites (except MathOverflow). This change was announced here on June 19th, 2019. These ads come from an advertising platform and are not targeted nor vetted as well as the ads from campaigns.
Ads only run on the main pages, not metas. Advertisements are either for the "top leaderboard", "sidebar", or "mid-page leaderboard".
Note that Community Promo Ads are different. Community Promo Ads don't generate any revenue, and require a high enough net score in order to be shown (I believe you need +6). House ads ("ads" for questions on other sites) don't generate revenue either.
Amazon Affiliate Links
You may not have noticed, but there is one subtle way this site makes some money: Amazon links. Whenever someone links to Amazon.com, the link becomes a Rads.stackoverflow.com link, which means that if someone clicks and buys a product they know that Stack Exchange referred the person and pay them a small portion of the profit from the sale. Across the network this “paid for far more than [some employee’s salary] each month”.
According to the post where it was first announced:
A sponsorship generally entails enabling ads relevant to the subject and affixing a small "sponsored by..." logo in the upper-right corner.
Currently, there are some sponsored sites:
It's important to note that Artificial Intelligence and Quantum Computing are (currently) beta sites in almost every respect (for example privilege levels), but they have a design. The sponsorship for Software Engineering, being internal, doesn't directly give any revenue but it does help get the word out for Teams (see below), which does generate profit.
Stack Overflow is the biggest site in the network and generates the most revenue. The following are Stack Overflow-specific revenue generators:
Yes, there are 250+ people employed by Stack Overflow. Management is listed here. The Community Managers are listed here.
I'm not sure what happened to the list of all employees, but you can find an archived list here.