If your computer runs, you can make system restore disks, and using those will restore it to factory condition (even if they weren't made when the computer was first ever turned on, it only says to do that first thing, because you usually can't do it when you actually
need to, I.E. computer is borked to hell and won't start)
How-to
Make sure you back up any files you want to keep, (putting them on a different partition works USUALLY, but I prefer to have them on something completely separate like a CD/DVD or another computer.)
You can sometimes find the .ISOs for a full system restore by googling around, but it has to be your exact model, so as you can imagine, it's hit or miss.