what's the correct form? (Where do you know it from? and How do you know it?)

I would like to ask what’s the difference between questions:
‘Where do you know it from?’ and ‘How do you know it?’ - if I want to ask where somebody got the information from
I was told that this second version is incorrect, but I came across this kind of question. I would be grateful for an explanation:)

.
Both questions seem a little vague to me, in that they could elicit a variety of responses. Certainly, neither is more correct than the other. On the other hand, neither seems particularly natural. I would think:

How do you know that?
Where did you learn that?

.

Thank you for the explanation:)