to have a connection pool you have at least two options:
-use a library that create the pool (you create it in your application and your application manage the pool) and use this pool to retrieve the connections.
-use applications server to create and manage the pool.
in first solution you download the library and use it to create a pool according to its manual, apache DBCP is a good option.
and here is a link to almost all open source connection pooling library that you can use for your connection pooling .
http://java-source.net/open-source/connection-pools in the second solution you build the connection pool/datasource in application server admin console (web / command line /swing ) and then you can access to that data source using JNDI .you can also configure the pool in the context file for tomcat.
here is the reference :
http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html using connection pool ,in brief, improve the performance by reusing the connections instead of creating connections each time that you need a connection.