The official language of Germany is, unsurprisingly, German. The standard form of German is called 'Hochdeutsch' (High German). This is a neutral form of German spoken by almost all natives.
It's made a little more complicated by the inclusion of historical dialects from different regions, some of which even native Germans might struggle to understand. You'll likely only encounter these in the south and rural areas of the north and east. So be aware that if travelling in Bavaria, Saxony, or Baden, dialect remains an important part of the local identity.
If addressing someone in German who you're not acquainted with you should use the formal 'Sie.' If addressing a friend, the informal 'Du' is more appropriate (both translate as 'You').
English is taught in all German schools, so you'll find that most locals speak it to a good level. You'll also find many Germans, particularly those in the tourist industry, speak French, Russian, or Spanish. Germans fluent in English will often offer to converse with you in English as a sign of politeness. If you want to practice your German, simply ask them - they'll likely take it as a compliment.
Some German is fairly easy to understand if you're an English speaker, as they come from the same language family. So you may recognise some German words when spoken or when reading signs.
Hallo = Hello.
Goodbye = Auf wiedersehen.
Excuse me = Entschuldigen sie mich.
Thank you = Danke schön
Do you speak English? = Sprechen sie Englisch?