After grabbing your luggage from the belt at HAM airport, which is really a breeze, it's a smooth 2 mins walk to the escalator to the suburban train (S-Bahn).
The S-Bahn line S1 operates every 10 minutes between Hamburg Airport and Hamburg’s central railway station, Hauptbahnhof, a journey of only 25 minutes. The “Hamburg Airport (Flughafen)” S-Bahn station is directly in front of both terminals and can easily be reached by lift, escalator or stairs.
Be sure to get a ticket from the ticket machine before boarding the train. For a single-ticket press "3" (2,85 €) and be aware that you have sufficient coins on hand (the ticket machine only takes 5 € & 10 € bills!).
At Hamburg central station your S-Bahn will arrive at platform #1, trains to Berlin usually depart from platform 6 to 8.