If you are trying to learn German while in Hamburg, you have a variety of options. There are two main ways for you to do so: first, you can take group courses with others who are learning German, or you can do what is called tandem partnering.
Group courses are available all over Hamburg; language schools, universities, and Goethe Institutes all offer group courses that you can take alongside your degree program.
There are also intensive language courses that you can take in order to make progress quickly. Several of the Hamburg universities offer summer courses that teach you German quickly during the term breaks. These courses are developed to help you make strides in mere weeks, and usually include lessons that introduce you to the country of Germany and its culture.
If you cannot find a local language course that fits your needs or schedule, then you can consider working on a group course online. You can communicate with your profession and your class using the Internet (usually voice chat, email, and forums).
These courses are usually rather inexpensive. If you are taking a one-month intensive course, you will probably pay between 200 and 500 euros ($250 and $650). Online courses would cost about the same, depending on your institution. When choosing a language class to work with, check out the size first; the smaller the class, the faster you will learn.
Your other option is making a tandem partnership. This is a very intimate, flexible, and inexpensive way to work on your German. The main idea of tandem language partnerships is that you meet with a German student that wants to learn your native language. Instead of taking formal lessons, you do a variety of normal activities together (walking, cooking, chatting online) and learn the language as you go. This is really advantageous because you can practice speaking a lot, and you can also learn about life in Hamburg first-hand. You can’t learn about the culture and mannerisms of Hamburg from a textbook; the first-hand experience gives you a huge advantage.
As you would expect, this is how you should do it if you are just planning to speak German. If you need to learn the ins and outs of German grammar and written language, you will need to take some sort of course or use an online supplement. Tandem partnerships are more informal, and should be used alongside a more formal way to learn the German language.