For 1), when a function is called the location from where it is called is pushed onto the call stack, and upon a return the function is popped from the stack and control returns to the last point of execution, where the caller can retrieve the return value from a register.
In assembly, this can be done through the instruction call func_name, which then jumps to func_name. Then the ret function is called, which pops the stack and returns to the call. Here is an example in NASM syntax assembly:
1 2 3 4 5 6
call func_name ; push the return address on the stack
...
func_name:
xor eax, eax
ret ; pushes the return value into [esp]