We can crash a computer by making it's Disk and Memory to 100% and CPU too above 50%.
I have tested on a 64-bit Windows 10 machine. After few minutes the whole PC would get stuck and the user will have to restart the PC.
You can do this in many different ways, with most if not all programming languages, and with most operating systems.
Just generate more and more objects, or on a lower level (e.g. C), allocate more and more memory.
In general, if you wait long enough (which may be 5 or more minutes), the OS will tell the process that there is no memory anymore, and will kill the process. Then the machine will work again normally.