Advertisers bid on keywords that they believe their target market will use when searching for products or services. When a user enters a query containing those keywords, the ad may appear alongside the search results. The placement of ads is typically determined by a combination of bid amount and quality score, which assesses the relevance and quality of the ad and landing page.