Facebook displays ads based on the information it collects about you. Although you cannot opt out of viewing ads all together, if you would like to stop Facebook from using your search history to send you interest-based ads, there's a simple way to disable this feature.
Log in to your Facebook account and go to
Settings >
Adverts. Click on the
Edit button displayed next to
Adverts based on my use of websites and apps and then toggle the
Show online interest-based adverts option
Off:
N.B. Disabling this option doesn't reduce the number of ads you usually see. Instead of receiving relevant ads, Facebook will now display random advertisements.