Java provides functionality that many programs use in the form of small programs called "applets". The first time a Java applet is requested by a program, that applet is created and kept in the Java folder. That applet can then be reused again and again.
Sometimes a program which uses Java will have issues. One way to fix the issues is to delete all of the Java temporary files (i.e. the applets which have been created and stored on the computer). If you do this, then the next time an applet is requested by a program, Java will recreate the applet, giving you a fresh, non-corrupted copy. It takes a moment to recreate the applet, so you don't want to delete the Java temp files unless you need to, because doing so will slow things down the first time they are requested, because Java will have to recreate them.
If you don't have Java installed on your computer, some programs won't run. It all depends on if those programs have been written to need Java.
It is important to get updates for Java as they are released, to make sure that recently discovered vulnerabilities will be patched.