SEO can be generally categorized into two components, 1) on-page and 2) off-page optimization, each of which is critical to search engine success. On-page optimization involves developing your site's content for relevance to popular keywords, and ensuring that its code and content are correctly structured such that search engine spiders can index them.
Off-page optimization refers to the quality and quantity of links pointing to a page, which are used by search engines to help determine authority and relevance. Many aspects of off-page optimization are not directly controlled by the site owner, but building quality content that is valuable to users can help make a site more "link-worthy" and contribute to its off-page optimization.
Both on and off page optimization are necessary to achieve effective, long-term SEO success in most industries.