The Schengen Agreement, signed in 1985, allows the citizens of Schengen* Member States to travel without a visa throughout the territory. On the other hand, nationals of non-Schengen countries may enter the entire territory with a uniform document, the Schengen visa.
Depending on your nationality, you must first apply for a Schengen visa to enter the Schengen zone and Germany.
*The Schengen area ensures unrestricted movement of people between 26 countries with more than 400 million inhabitants. An area without internal border controls.