Every page on the web has an address, a URL, which stands for ‘Uniform Resource Locator’. Sometimes, content moves from one URL to another URL. That’s when you need a redirect. A redirect automatically makes a browser go from one URL to another URL. A redirect can point to any other URL: it doesn’t need to point to the same website. Redirects to another domain are sometimes referred to as cross-domain redirects.
Serverside redirects are performed directly on the server and result in a tiny bit of content being sent to the browser, in so-called HTTP status headers. The browsers then know where to go and will follow immediately. These HTTP headers have a code for the type of serverside redirects, and a new location to which the browser should take you.
Browsers will cache a 301 redirect and immediately perform it again next time without needing to fetch the original URL again until the cache is cleared. This is, for instance, the case with language or geo-location based redirects. Browsers will not cache a 302 redirect, so the server will be getting a request for the original URL every time. Search engines will follow the redirect, but maintain the old URL in their index. Because too many systems use a 302 by default, instead of a 301, search engines tend to treat long-standing 302s like 301s in many ways. Browsers will never cache 307 redirects. Search engines might not always follow 307 redirects as they’re deemed temporary.