Backlinks, brand mentions, reviews, social sharing
Fully in your control
Only partly in your control
Results can come faster
Takes more time to build
Both are needed. On-page SEO makes the page good, and off-page SEO shows the search engines that others trust it. Technical SEO (speed, mobile, sitemap) is often counted as a third part. See Types of SEO.