It's no secret that turning your computer off and on again fixes a lot of problems. If you've ever wondered why though, How-To Geek explains how it works.
Restarts fix you computer for all sorts of reasons, and How-To Geek takes a look at the most important ones. For example, the Windows blue screen of death is usually caused by a low-level error, and it's fixed when you restart, because the problem code can start over again. The other common problem is memory leaks:
In the past, Firefox has been the poster child for memory leaks on average PCs. Over time, Firefox would often consume more and more memory, getting larger and larger and slowing down. Closing Firefox will cause it to relinquish all of its memory. When it starts again, it will start from a clean state without any leaked memory. This doesn't just apply to Firefox, but applies to any software with memory leaks.
Essentially, when you restart your computer, you're clearing off the current state of your software and starting over again. You're basically dumping out the junk and starting over again fresh. This includes whatever problems you've run into. Head over to How-To Geek for the full explanation of what happens when you reboot, including the difference between hard and soft resets.