What is search engine optimization for?
Google's own starter guide describes SEO as helping search engines understand your content and helping users find your site [1]. The same guide is blunt that there are no secrets that will automatically put a site first in Google [1]. The work is less about tricks and more about making pages easy to reach and easy to read.
How does a search engine find and show a page?
Google describes three stages. Automated programs called crawlers download the text, images and video from pages they find. Google then analyses each page and stores what it learned in a large database, the Google index. Finally, when someone searches, it returns the information that is relevant to the query [2]. Most sites are discovered automatically during crawling, but the guide notes there is no guarantee that any given site will be indexed [1].
Google also states that it does not accept payment to crawl a site more often or to rank it higher [2], which is why SEO sits apart from paid search advertising.
What does it look like in practice?
Take a recipe site whose recipe pages can only be reached through its internal search box. A crawler that follows links may never reach them. Adding plain links from the home page and category pages gives crawlers a path in, since Google discovers most pages by following links [2]. Descriptive titles, readable URLs and text written for the reader are among the basics the guide recommends [1].