SEO involves optimizing websites for search engines through on-page and off-page techniques. On-page SEO focuses on internal elements like titles, descriptions and content while off-page SEO involves external links, social media and link building. Getting natural, relevant links from authoritative sources is important for rankings. While link building was exploited in black hat SEO, Google now focuses on quality over quantity and punishes manipulative practices.