301 redirect is a permanent redirect whereas 302 is a temporary redirect. Permanent redirects tell search engines that old URL is out so that they can pull this new URL in it’s place. 301 is used when you want to preserve the page index and keep the page rank.