Restarting your PC is also called a reboot because it does just that. It clears the memory, stopping any tasks eating up your RAM. When your RAM isn't enough to keep up with your activities on the computer, it will slow down and eventually crash. Rebooting isn't a long-term solution, so consider this as a way to free up space while you get help temporarily.