The normal word order for a sentence is a subject followed by a noun.
Inversion places a verb before its subject. It is used most often in questions.
When a question word (such as what or how) is used in the middle of a statement, the subject and verb of the clause that follows is not usually inverted. Inversion can be used for special emphasis or meter, but this is done sparingly.
Dad asked what was the problem.
Dad asked what the problem was.
Excuse me, do you know what time is it?
Excuse me, do you know what time it is?
I know who is your teacher.
I know who your teacher is.