A 301 is a Permanent redirect. It is used to tell browsers or search engines that the page they just got sent to as permanently moved to a new location. Search engines will use this indication to transfer their indexed data from the old page to the new one.
A 302 is a Temporary Redirect. In this case the search engines do not transfer their index data.
A 302 redirect means no PageRank is transferred over the redirect. A 301 redirect means most (but not all) of the PageRank is transferred.
You want to avoid 302 redirects and use 301 redirects as sparingly as possible (like on a website restructure).