AH sad machine. It came with Vista as an operating system which is not great.
I virus or mal ware can be running so any crapware in the background it can over power the processor and make it heat up needing the fan to be on full blast.
I know what it is like to have an old computer and you just want to keep using it and it work well. It has a dual core but limited to one gig memory and a small hard drive. If you do not have a friend who can help you for free then a computer repair store would probably need $100 to start a fix. You have to decide if anything on the hard drive is worth saving, if nothing is then put the operating system disk that come with it in the DVD and then shut down the computer or unplug it if you can not get the mouse to work. It should boot to the disk and you will see a statement to hit any key to run the disk . Then just format the hard drive and have a fresh start.
Again this is not a hard thing to do and typing out the whole procedure here would be fun but taxing. Utube has many videos on how to reload Vista from scratch. Do not be frightened, you can not kill it even if you get it wrong the first tie just re do it again.
NOTE: You have led us down the path of saying your computer has been taken over with malware and virus. It may be possible the CPU cooler fan and heat sink is full or dirt. Get a can of compressed gas, remove the side and take outside then blow the inside out mostly the cooling heat sink.
Good luck