The return command exits a function and returns an optional exit status. 'local' creates local variables, 'function' declares functions, and 'parameter' is not a shell keyword. return is the only command that exits a function with a status code.
In shell scripting, return is used inside a function to exit that function and optionally set its exit status, similar to how exit works for a whole script. local just scopes a variable to the function, and function is merely the keyword used to declare one, so neither of those causes an exit.