What are the differences between these two phrases?
For example, how would you qualify the difference between these two sentences: "What exactly is that book about?" and "Exactly what is that book about?".
First of all, they are basically the same thing thing. However, I think there are some subtle differences in how they are used.
The first is more common and is probably preferred in most cases. It simply means "Tell me what that book is about, and be specific and accurate."
If someone decided to use the second phrasing, they would be putting more emphasis on the word "what" since what is being modified by the phrase 'exactly.' The phrase would probably come after the two people had been talking about the book for at least a sentence or two.
Because we are emphasizing the word "what", we just want to know very strongly what it's about!
What this would mean is "I'm really confused or unclear about what this book is about, so please explain!"
You can tell that "exactly" is emphasized in the first sentence because 'what' modifies it. So what we care about here is an exact definition.
You can tell that "what" is emphasized in the second sentence because "exactly" modifies it. So what we care about is getting an answer.
Exactly is an adverb; it modifies a verb. Your first example, "What exactly is..." would be the correct form. The second is more informal; "Exactly what is..." has moved "exactly" away from the verb it is modifying. Moving words or phrases to the front or back of a sentence is something we do, and it is fine, as long as we retain some sense of what the words are actually saying.
Verbally, the second example could also be used to make an imperative expression: "Exactly, what is the problem?"
For casual use, both examples can mean the same thing. For a legal contract I would keep an adverb next to the verb it is modifying.