There are multiple ways one can redirect the user from one URL to another.
HTML Meta Redirect
JavaScript Based Redirect
Server-side temporary 302 redirect
Server-side permanent 301 Redirect
Google recommends a 301 permanent redirect to pass the SEO benefits of the old URL to the new one.