You would say, "I don't understand the difference between A and B."
You could also say, "I don't understand how A and B are different."
THE difference is simply recognizing that there is a difference.
HOW it is different is being able to explain that difference.
There is a difference.
What is the difference?
I don't know. I don't understand the difference.
How is it different?
I don't know how it is different.
I cannot even explain or understand the difference between A and B!
It's a little tricky. ;-)
Does it make better sense to you?