It does exactly what you think it would do - it "returns" whatever immediately follows the return statement from the function. By "return"-ing, it stops the function in it's tracks. The return statement, if executed, is always the LAST statement to be executed by a function.
In your example above, the anonymous function that is inside your function will return false (because if(true) will always be executed) to whatever variable is assigned to the function (in this case there is none). Thus, do() won't get called.
However, that return statement is inside an anonymous function and has no affect on the outer function it is contained in. The outer function returns false right before doSomethingElse() would've been called. Because return is always the last statement executed by a function, whatever follows it - doSomethingElse() - won't get executed.
Clear as mud?