Phillip is correct. System processes such as Windows OS won't clear from RAM until after a system reboot or shutdown has been performed.
That said however, all applications and processes that were running under the user account logged in do get closed upon logging off the computer - thus freeing up RAM. That's because as the user profile closes, so do all child running processes as well. That's not true however if you simply just lock your screen (Windows key + L), or choose "Switch User".