There are plenty of threads on this forum telling you how to use fsck. Just search and you will find them.
As for hacking attempts, I did have my computer slow down quite seriously here when I had sshd running and the ssh port forwarded in my router, and someone started bombarding the port with automated log-in attempts, so yes, it is possible if you have external access enabled for some reason.
I have since tidied up my iptables rules to ensure the port is only open to the machine which needs it.
However, a corrupted file system is a more likely cause, and hardware problems are even more likely.
My first computer (1997-2003) would suddenly reboot about every six months for no apparent reason. My second one would sometimes stop suddenly (even the fans) at about the same frequency. I blamed the OS (I was on Windows at the time). Then one day (about ten years after I got my first computer) it happened in the evening when I was working under artificial light, and I discovered the real cause was a momentary drop out of mains power which reset the computer. The BIOS on my first machine had been set to reboot. My second machine was set to stay off. Random problems are difficult to track down and need a methodical approach. Don't guess unless you know how to test the hypothesis.