Search engines like Google crawl the web to build indexes of billions of web pages. They use algorithms to determine the relevance and importance of pages to calculate search rankings (page rank). SEO involves optimizing content and web pages to target relevant keywords so they can rank highly in organic search results. Basic SEO practices include creating accessible content and optimizing it for target keywords, building links from other relevant sites, and engaging audiences on social media which search engines now also consider.