A redirect is an instruction from your website saying "this page now lives at a different address". When someone, or Google's crawler Googlebot, asks for the old address, the server answers with the new one.
You need redirects whenever web addresses (URLs) change: a new domain, a switch from http to https, new page paths, or merged sites.
A permanent redirect says the move will not be reversed. A temporary redirect says the original address will come back. Visitors rarely notice the difference, but Google does.