You can get to Hamburg by rail, road, air and even by boat. Here, we will present you the most likely ways to reach Hamburg (so, not by boat):
By rail
If you are from continental Europe or your flight goes to another city than Hamburg you might want to use the train. These are mostly operated by the de facto monopolist Deutsche Bahn and tend to be rather expensive. However, if you book earlier - not earlier than 90 days though - you have the chance to get to purchase a reduced ticket ("Sparpreis")!
Generally, it is a fast and pleasant way to travel. For further information, visit:
http://www.bahn.de/p_en/view/index.shtml
Keep in mind that you might have to print out your online ticket!

By bus
A few years ago Germany liberalized its long distance bus market, which made it quite cheap to travel from one city to another by bus. This is certainly not the quickest way to travel but if you need to travel inside of Germany and you want to save some money, its certainly a cosiderable option. One of the most useful comparison/search sites can be found here:
http://www.busliniensuche.de/
Keep in mind that you might have to print out your online ticket!

By Air
There is an airport in Hamburg which also serves some quite affordable airlines such as easyjet or germania. Alternatively you might want to fly to another airport in northern Germany and go to Hamburg by rail or bus.
Therefore there are several other options:
via Berlin (Schönefeld / Tegel)
Berlin has two Airports Schönefeld in the south and Tegel in the north.
From Tegel it is quite easy, you can take the Bus TXL (Basically a airport shuttle) to the central station and take a train to Hamburg from there. There are also regular bus connections from Berlin to Hamburg (about 3,5 hours drive).
There are several bus companies serving this route, including flixbus, Berlin Linienbus and Postbus. There are several Bus stations around Berlin (one at the Central Station as well) so please make sure you are heading for the right one.
For all public transport in Berlin (especially from Schönefeld), you might find this website very useful:
http://www.vbb.de/en/index.html
via Bremen Airport
Since Ryanair and other low cost carriers operate from Bremen it is possible that you end up here. From Bremen Airport its about 1 hour 20 to Hamburg by tram and train.
First you take the tram No. 6 from the Airport to the central station in Bremen, and from there on you can take various trains to Hamburg.
via Hannover Airport
Hannover is another major airport in northern Germany, and it is quite close to Hamburg as well. From Hannover you can take the S5 from the airport to the central station and from there on go by bus or train to Hamburg.