In English and in German, we can differentiate between two kinds of direct questions: "Ja/Nein Fragen" (Yes/No questions), or Ergänzungsfragen (problem questions).
1. Ja/Nein-Fragen/ Entscheidungsfragen
When forming a yes/no question or "decision" question in German, we need to use inverted word order. Inverted word order means that the subject slips behind the word. This happens in English when we ask questions with "to be", or when we ask questions with modal verbs.
Are you tired?
Can you drive me to the airport?
In German, we always use inverted word order for direct questions, even for questions that would require the auxiliary verb "to do". (e.g. Do you have the keys?"
Du hast die Schlüssel. Hast du die Schlüssel?
You have the keys. -> Do you have the keys? (lit: Have you the keys?
Er kann mich anrufen. Kann er mich anrufen?
He can call me. -> Can he call me? (lit: Can he me call?)
Notice how the answer for the above questions can only either be "Ja/yes" or "Nein/no".
2. Ergänzungsfragen (probe questions)
Ergänzungsfragen, or "proble" questions ask about specific details, either about time, location, duration, purpose, etc. Probe questions require a question word, which will always be placed in position one, followed by the verb and the subject in inverted word order.
The question words "Woher" und "Wohin" are separable. Their suffices "-her" and "-hin" can also be placed at the end of the question sentence:
Woher kommst du? -> Wo kommst du her? (Where do you come from?)
Wohin geht sie? -> Wo geht sie hin? (Where is she going?)
Questions that ask about quantity "Wie viel" and "Wie viele" follow a slightly different word order. The noun for which we are asking the quantity is placed before the verb and subject.
Wie viel Geld hast du? (How much money do you have?)
Wie viele Hunde hat er? (How many dogs does he have?)