What is Difference between Apache and Tomcat

Apache" is the name of a foundation that write open-source software. Apache HTTPD is a web server written in portable C (when people say "Apache", they usually mean Apache HTTPD.) It mostly serves static content by itself, but there are many add-on modules (some of which come with Apache itself) that let it modify the content and also serve dynamic content written in Perl, PHP, Python, Ruby, or other languages.

Tomcat is primarily a servlet/JSP container. It's written in Java. It can serve static content, too, but its main purpose is to host servlets and JSPs. Although it's possible to get Tomcat to run Perl scripts and the like, you wouldn't use Tomcat unless most of your content was Java.

It's actually possible to use both Apache and Tomcat together, so that Apache serves the static content, and Tomcat the Servlets and JSPs. Depending on various factors, this may or may not be a good idea.

An "application server" is a fuzzy concept. Really, it just means software that hosts pluggable application code. You could call Apache and Tomcat application servers and not really be wrong. But usually when you say "application server" you mean more than that. For example, a Java application server usually hosts EJBs as well as servlets and JSPs, and it usually has fancy tools for deploying and configuring applications that go way beyond what Apache or Tomcat have.