What is it?
The servlet-api jar is a library which contains the interfaces and classes of the Servlet API specification. The servlet-api jar contains only the interface (the API) of the Servlet Specification, so you can use it to develop your web application.
Where can you get it?
It is provided at the link below:
http://download.oracle.com/otndocs/jcp/servlet-3.0-fr-eval-oth-JSpec/
Where it is contained/bundled
Servlet-api.jar is part of the Java EE download so you can develop your web applications (you could not compile your FirstServlet
class if the Java EE would not contain it).
Servlet containers (like Tomcat, JBoss, GlassFish etc.) also contain the servlet-api.jar else they would not be able to run your web application, and moreover they also contain the implementation of the interfaces that are part of the Servlet API.
The name is not always the same though, and it might not even exist as a separate jar, the Servlet API classes might be bundled in another jar.
You can however download a separate jar file containing only the Servlet API if you just want to develop a web application for a Servlet container, or if you want to create/write your own Servlet API implementation. Look at here:
http://download.oracle.com/otndocs/jcp/servlet-3.0-fr-eval-oth-JSpec/
Portability
You can compile your web application if you have the Servlet API, no matter where it comes from. After you compiled your web app, you can optionally pack it into a WAR file (WAR=Web ARchive) which is simply a zip file containing your static files, your compiled java classes and configuration files like web.xml
etc. And you will be able to run your compiled web application in any Servlet containers (but read forward).
So answer to your question #5 is:
There are multiple versions of the Servlet API, and there are more to the Java EE platform than just the Servlet API (e.g. Enterprise Java Beans). But it's safe to say that if you only use the Servlet API, all Servlet containers that implement that version of the Servlet API will be able to run your web application.
The configuration files of the different web applications might differ though (which is outside of the Servlet API scope), so you should always check the documentation of the target web application.