Before you can dive into every element of SEO, you have to start with the basics, including an understanding of exactly how search engines work.
Check out this quick video, from SEMrush which showcases exactly how the internet and search engines work.
Also, check out what Matt Cutts had to say about Google:
“When you do a Google search, you aren’t actually searching the web. You’re searching Google’s index of the web, or at least as much of it as we can find.
We do this with software programs called spiders. Spiders start by fetching a few web pages, then they follow the links on those pages and fetch the pages they point to; and follow all the links on those pages, and fetch the pages they link to, and so on, until we’ve indexed a pretty big chunk of the web; many billions of pages stored on thousands of machines.”
– Matt Cutts, How Search Works