Since you mention you are a beginner siting and example based on usage would make tings a little clearer I guess. Java would most likely be used for developing applications that run on a stand alone PC such as a desktop GUI program. If you are aware of file sharing peer-to-peer applications, LimeWire is one of them. Java is also used to develop applications that run on the server, such applications normally run without much user interaction and continue to run for days or even months on end without being stopped even once. Various services offered by companies to their clients e.g. messaging service fall in this category. These applications are often called command-line based applications as they are started by commands on the command shell.
Google about both of them for further information.