That’s what SEO – or search engine optimisation – is really about.
Search engines like Google or Bing have algorithms that are very complex and kept somewhat secret (so that they can’t be manipulated falsely). But they have common criteria for successful ranking in their searches too.
Search engines have ‘bots’ that crawl around the web and build a huge index of sites, these sites are then ‘ranked’ as to which are most relevant . To give you some idea; a search engine algorithm will measure at least 200 factors to try to find a good match when someone types words (keywords) or phrases (key phrases) in as a search.