The 'return' statement is used to exit a function and send a value back to the caller. It allows the function to produce a result that can be used elsewhere in the code.