my computer started going crazy today

so i was minding my own business when all of a sudden a black square got on the upper left screen, then it started growing bigger and faster, then my screen went back to normal, i was relieved, then the screen went weird again, the text and graphics started looking really messed up for no reason, and the computer went unresponsive for about a minute or 2

what the hell is happening to my computer?!?! and how can i fix it?!!?

here is a picture of how it looked like when the graphics and text went weird