Search engine optimization is the practice of optimizing websites to increase their visibility in organic search results. Search engines rank pages based on over 200 factors including on-page elements like keywords, content, and site speed, as well as off-page signals such as links and social engagement. White hat SEO follows search engine guidelines and prioritizes users, while black hat techniques manipulate rankings through spammy tactics like keyword stuffing, cloaking, and link farms.