Stopping execution of a function?

This is a stupid question I know. But how do you stop the execution of a function?