Knowledge is traditionally defined as "justified true belief".
Nailing down which beliefs really count as knowledge is sometimes tricky and requires a lot of qualifiers.
Consider a factual claim X, such as "The moon is made of green cheese." If I say that I "know" X is true, we may assume from that I also "believe" that X is true (unless I am lying or deluded about my own beliefs, which is rare). However, my statement is wrong in two ways. First, X is false (the moon is not made of green cheese), so I am factually incorrect about my belief. Second, I cannot truly be said to know X, because one can only know a true statement.
However, even if one believes something that happens to be true, this isn't necessarily knowledge. Suppose you walk onto a crowded subway, and you pick out a stranger from the crowd, and you tell yourself: "I believe that his name is John Smith." Now let us further suppose that the stranger happens to actually be named John Smith. This is purely coincidental, because John Smith happens to be a common name and you had no way of knowing what the stranger's name was. The question is, did you really "know" that his name was John Smith?
Philosophers would say no. Even a true belief cannot be properly termed "knowledge" unless there is a good reason to believe the statement. This is why the word "justified" is included in the definition.