Every once in a while my laptop takes about 20 minutes to re-configure Windows 7, shutting down and restarting and taking me back to where I was working before. Although I do not lose the document I am working on, this is rather annoying. Why is this happening?
Your computer is likely installing Windows Updates. These are updates, typically released on the second Tuesday of every month, or "Patch Tuesday". To only download and install these updates when you want, go to Start -> Search -> Windows Update -> Change Settings.
From there, you can determine how you want updates installed on your computer (whether automatically or manually). It is important that you do keep the operating system up-to-date, and you instead may want to simply download them all at once by checking for them and installing them yourself. Most of the updates resolve security vulnerabilities.
In the Windows Update area, you should check to make sure that updates are not failing. Use "View Update History" to see what is going on.
I would think that this is what is happening to your system based on what you have stated. It could be something much worse, but if you see a screen telling you that "Windows is configuring updates", etc. that is what is going on here.