A visa to Germany will entitle you to travel to any country that is part of the Schengen space. Nevertheless, you might need to prove that you have sufficient funds for travelling outside Germany at some border points (such as airports). It is therefore advised to carry copies of the documents used for your visa application (e.g. bank statements, payslips, health insurance etc.) when visiting another Schengen country. If in possession of a national visa (cat. D), you are entitled to spend three months in another Schengen state for any six month period.
Please note that the United Kingdom (UK) is not part of the Schengen space. A Schengen visa will not entitle you to travel there. If you plan to travel to UK from Germany, you will need to make separate visa arrangements.
List of Schengen countries: Austria, Belgium, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, the Netherlands, Norway, Poland, Portugal, Slovakia, Slovenia, Spain, Sweden and Switzerland.