when I saw movie, a man who wanted to greet with another woman was saying "what do you know?" at first. and he said "it's been months.." so I didn't understand why he questioned what woman knew about something. I even didn't know what is the something he was wondering. But it was an expression of surprise. Is there other sentences like this sentence that can make English learner confused? And can explain histories with these idioms?
It's an idiom, expressing (as Kys said) surprise. A slightly longer form is "what do you know about that!" (There is no "that" to know about; it's like the "it" in "take it easy").
Besides being an expression of surprise, unless it's being said sarcastically it's often a passive request for an explanation of the unusual event.
For example, where the person says "[well,] what do you know!" because of unexpectedly seeing someone they thought was far away, it means, and is sometimes followed explicitly by, "what brings you here?"