SEO is optimizing websites to make them more search engine friendly. There are three main types of SEO: black hat which uses unethical techniques, grey hat which uses some unethical techniques, and white hat which uses only ethical techniques. SEO optimization includes on-page techniques done on the website itself and off-page techniques done off the website to gain backlinks.