All search engines have an advertising platform. Google has google ads (previously adwords), microsoft has microsoft ads (previously bing ads). These platforms allow you to choose relevant keywords, and place a bid, or maximum amount you would be willing to pay for a click. When a relevant search takes place, an auction happens that takes numerous weighting factors into account to determine the order of ad placement on the page, positions 1-3 in the top and 4 and 5 at the bottom. (this is a massive simplification of how this works, and there is no unified search results page)