This is a very common question, and knowing the answer should open up a whole world of understanding for you.
If you look at java.sql.*, almost everything is an interface. Who implements all of these interfaces? The JDBC driver! You know how you have to load a JDBC driver before you do anything else (typically with Class.forName()?) Well, that class that you load by name registers an instance of a class that implements java.sql.Driver with the JDBC driver manager. When you try to connect to a database, the driver manager asks that Driver for an instance of an object that implements the Connection interface. When you ask that Connection for a Statement, it returns an instance of a class that implements Statement -- and so on. The reason it's done this way is that connecting to each different database requires different code internally, but by using this common set of interfaces, your database code can be largely independent of the database you use! You can switch database by using a different driver. You get a whole different set of classes to work with, but since you only reference them through the interfaces they implement, your code doesn't have to change at all!