From original question
I thought only " what does@@mean?"was grammatically correct but I heard a lot of Americans saying "what does it mean by @@?"
If you saw something confusing on a street sign, you might point and say "what does it mean by that".
Here, "it" would refer to the sign. You are treating the sign as if it were a person who had said something. So it's very similar to sentences like "What did he mean when he said that?"
This isn't particularly common. If you are reading and trying to understand a book that has a lot of confusing sentences and it's like the book itself starts to take on an evil identity...it might be more common. :-)
As for "What does it mean that (...)", there are rare cases you might hear it as a kind of question to provoke thought, where you're not expecting an answer (e.g. a "rhetorical question".)
- "What does it mean that one fourth of humanity lives without electricity?"
But if you're really asking about what something means, "What does (...) mean?" or "What's the meaning of (...)?" would be what you'd want to use.
From updated question
I thought only "what does _____ mean?" was grammatically correct but I heard a lot of Americans saying "what do you mean by _____?"
Are both of them correct? Are there any differences between those two?
If you ask "what do you mean by ____" then you are suggesting the person has said something you want them to explain. But "what does ____ mean" could be asked of someone whether they've said anything or not. You're just asking a question about the general meaning of something.
In usage, "What do you mean by that?!!?" can be a strong negative reaction...usually when someone has said something that the person feels was meant to be insulting even if it wasn't "obviously" so. So it's not really asking for clarification, because the speaker has already assumed it was meant in a bad way.
But it can also just be a polite phrase asking what someone meant.