Germany is a signatory to the Schengen Agreement, which enables free circulation of residents within Schengen Area countries. A visa granted by one of these countries is valid in the whole Schengen Area. Travelling within the Schengen Area is legally the same as travelling within Germany. If you enter Germany with a tourist visa, you will be able to stay in Germany and/or any other country in the Schengen Area for up to 90 days during any 6-month period.
The 15 Schengen countries are: Austria, Belgium, Denmark, Finland, France, Germany, Iceland, Italy, Greece, Luxembourg, Netherlands, Norway, Portugal, Spain and Sweden.
In addition to Spain, the other parties to the Schengen Agreement are: Austria, Belgium, Denmark, France, Finland, Greece, Iceland, Italy, Luxembourg, the Netherlands, Norway, Portugal, Spain and Sweden.
Iceland, Norway, and Switzerland have signed the agreement but are yet to implement it. The Republic of Ireland and the United Kingdom are not Schengen states.
* Although you can leave the Schengen Area and come back in as many times as you need during your 6-month visa validity, the total amount of time you can stay in the Schengen area cannot exceed 90 days.
* A visa granted by one of the Schengen countries is valid in all other member countries.
Trivia: Schengen is a place in Luxembourg where the original treaty was signed in 1985.