There are several subway lines that are easy to access and that get you pretty much everywhere.
We have the S-Bahn and the U-Bahn (Bahn for train). Download the picture next to the text to get the full map of all stops.
The homepage of the public transport in Hamburg can tell you which lines to chose and how much it is to get from your A to your B. (The street names are enough you don't need to know the name of the subway stop)
The green S-Bahn runs more or less above ground and the blue U-Bahn runs more or less underneath the ground (at least that's the way it's supposed to be).


