I don't see what's wrong with Mega's answer? He explained exactly what return does...
In case he was unclear, return does exit the function... However it can also, in simple terms, transport a value from a function to another function if a value is inserted in front of "return". For example:
function lol()
{
return ":I";
}
function echoLol()
{
%valueFromLolFunction = lol();
echo(%valueFromLolFunction);
}
When the "lol" function is called from the "echoLol" function, the value ":I" is returned to the "lol" function and is echoed into the console.