This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
It is actually the forName() method which does the work. forName() is a static method of Class; it causes the named class object to be loaded by a class loader. So the JDBC connection class is loaded into memory for access by the JVM.
The JDBC classes incorporate a static initialiser block, which is executed immediately after the class is loaded into memory; this static initialiser calls method which institute the actual connection.