The fan is for keeping the CPU cool.
There is a heatsink (The finned aluminium block which helps take the heat away from the CPU and the then the fan blow cold air on to the heat sink to cool it.
The CPU - Central Processing Unit it basically the brain of the computer and dictates the computers speed and perforfance. When operating gets fairly hot, hence the Heatsink and fan combination to cool it, there is generallt some (White) thermal parst between the CPU and Heatsink.
Looking at the CPU it is and older version, the bent pins are a sod to straighten, if the snap then consider the CPU knackered.
so not worth fixing then? 
Thank you so much for all your help 
A replacement CPU might cost peanuts from Ebay and you may even be able to fit a faster one.
Have a look at the main system board (Motherbaord) that the CPU was pluged into. Have a look for a brand name, Focom, Abit, Asus, Gigabyte, MSI are just a few brand names, then look for a model number and I will check the net for you to see what can be fitted.
Also have a look on the otherside of the CPU for any writing to tell what it is.
Also be aware of static in your hands, it is allways advisable to discharge yourself by touching the computer case chassis for example, this could save furthar damage to any electronic components.