There are many things that can cause a computer to shut down. If your computer stops responding, then it’s probably a software problem.
Operating systems consist of millions of lines of programming code, and inevitably the code contains weaknesses. Sometimes when you open a series of programs you trigger something in the code that makes the operating system go into an infinite loop where it executes the same instructions over and over, making it seem like the computer is frozen.
And then there’s always the possibility that you have too many programs open. When a bunch of programs are competing for the same memory resources, sometimes memory gets used up when the computer has to switch back and forth quickly between programs.