Once upon a time Java was a promising cross-platform technology that allowed you to run applets in your browser. Unfortunately, the promise never panned out. Java is on most Windows machines but the average home PC owner rarely, if ever, uses it. The never-ceasing security problems with Java and the lackadaisical attitude of Oracle about fixing it mean that most home PCs would be better off without it.
You can go to Control Panel and uninstall Java in the usual place for uninstalling programs. You should also check all your browsers for Java add-ons and remove or disable them.
If you need Java for some reason, use the free program JavaRa to remove old versions of Java and install the latest updates (download JavaRa here). However, as of this writing, there is still a security hole in the latest Java.
More information can be obtained at Michael Horowitz’s Defensive Computing blog