Display ads are generally targeted towards users based on their current context (contextual targeting), past behavior (behavioral targeting), or a combination of the two.
That is known as "contextual" targeting, and many advertisers consider it less effective than "behavioral" targeting, which identifies specific users and their interests.
Current smartphone technology allows for nearly infinitely granular targeting based on behavior, third-party data, contextual data such as location, and universal sign-in profiles.