Basically, you load the Driver or get a DataSource, then use that to get a Connection to your DB, with that you create a Statement which will allow you to retrieve a ResultSet (that's the whirlwind tour from 10000 feet high).

JDBC is too complex a subject to cover in a post like this, but the guide should get you started, and there are lots of introductory articles out on the web.