301 Redirects are used when content that was located at one web address or URL is moved to another web address. Its useful to ensure traffic is still served when using the old web address. Consider:
A product page for for rat poison and what to do if accidentally ingested is available at the company’s website. Poison Control googles that poison and finds the page with the instructions and bookmarks it for future reference. The company is bought out by a larger company who will rebrand the poison. When it is rebranded the original site will be turned off. Without a 301 redirect the poison control bookmark would just go to an error. With a 301 redirect the old link is redirected to the new site’s content.
Is the same thing as a 301 Redirect but is temporary. If a search engine crawls a page and sees a 301 redirect they know to change the listing in their results to the new target. A 302 redirect tells them not to make a change as this is only temporary. They are used less than 301 redirects.