Redirect — mechanism to send user and Google to another URL.
301 Permanent
Permanent move. Google transfers ranking (95%+) to new URL.
302 Temporary
Temporary. Google keeps old URL indexed.
When 301
Domain change, page deletion, HTTP→HTTPS, www→non-www.
When 302
A/B testing, temporary promo, geo-redirect.
Common mistake
Using 302 for permanent move — Google won't transfer ranking.