Recent versions of Windows all run their programs (processes) in a separate space in memory so they can't affect each other. In theory, if a program crashes, just that program dies and it doesn't bring down the others.
But sometimes a program will so corrupt the memory that it affects the mechanism that keeps these processes separate. At that point, the operating system can't prevent a crash bringing down the whole system.
Some programs are privileged and get greater access to the operating system code. Examples are drivers for hardware. If one of those drivers misbehaves and crashes, it can potentially bring down the operating system. Windows is designed to provide a Stop screen which contains details of which process was running, what memory addresses were involved, and also dumps a trace of some of the recent program calls. That helps software engineers diagnose the cause. But it doesn't help the user. They have to reboot and potentially experience it all over again.
The most likely cause of Windows BSoD screens are driver problems. Next most likely is memory errors on the memory chips in the machine which are replaceable. Sometimes, it can also be caused by hard disk errors where the area on the HD contans operating system code. If you look carefully at the Stop screen, you can sometimes see mention of which driver it was. That can give you a clue as to which device is causing the problem. Disconnect it, download the latest driver and install it, then reuse the device. Often that's enough to solve the problem.
Windows 7 is not immune from BSoDs as is evidenced by the latest scare stories.