There's a few different ways of looking at this.
Firstly, the only current version of Java is Java 6 currently at Update 17 or so. Java 5 and earlier have all been end-of-lifed. What's a little confusing is that starting at version 1.2 Java adopted the name "Java 2" (and was referred to as J2SE or "Java 2 Standard Edition") so it was Java 2 version 1.2. After Java 2 version 1.4 (or more simply Java 1.4). Version 1.5 became Java 5 or J5SE although J2SE is still pretty common.
The other version of Java that's relevant is Java Enterprise Edition ("JEE"), formerly J2EE ("Java 2 Enterprise Edition") with version 6 being imminent. JEE specifies a set of standards for server apps. The most important part is the servlets specification, which is the basis for 99.9% of Java Web frameworks. It has versions and is currently at either version 2.5 or 2.6 (I forget). Apache Tomcat is the reference implementation of the servlets specification.
Another part is EJB ("Enterprise Java Beans") currently at EJB3/3.1. It's a component architecture and really heavyweight. It's not used anywhere near as often as the base servlets specification.
Whereas Tomcat is a Web container, full JEE supports is provided by what's called an application server. Examples include Glassfish, JBoss, Weblogic and Websphere.
Java classes are often packaged as JARs ("Java ARchives"), which is simply a zipped file with a specified directory structure.
Web applications are packaged as wars ("Web ARchive"), which is just a jar with a different extension. WARs may contain libraries in JAR form.
Full JEE apps are packaged into EARs ("Enterprise ARchives"), which again is just a different file extension and it may contain war and other files.
Now to complicate this there are about a bazillion Java Web frameworks such as Struts, Spring MVC, Tapestry, Wicket and many, many others.
Also, it's fairly common for Java Web and enterprise apps to use the Spring framework. Spring is (imho) a must-have for Java serverside development as it simplifies a lot of vendor and library differences and makes your application far more pluggable.
Confused yet?