How do the authors of dictionaries know what is the meaning of words? They may know the occasions when people say or write those words, but they still have to guess what words and people mean on those occasions, don't they?

The rough answer is that the authors of dictionaries do it the same way the rest of us do. When you run up against a word that's not in the dictionary, sometimes you can tell what it means from context, and sometimes you find out by asking other people. In fact, for most of human history, these were the usual ways of learning the meanings of words. How this works in detail is a deep and interesting question, but whatever the answer, it clearly does work and so there's no special problem for compilers of dictionaries.

Here's an illustration adapted from https://bestlifeonline.com/new-words-2017/. If someone said "Just ping me when you've made a decision," you might need to do a bit of guessing or asking, but it wouldn't take too much work to figure out what they mean: "Get in touch with me by text or email or on Facebook messenger or..." Lexicographers have more systematic and refined methods for deciding what people use a word to mean, but they don't do something radically different from what ordinary speakers do.

We can add that words don't get into the dictionary until they reach the point of being widely used. Sometimes the question isn't so much what people mean by the word (though the dictionary will duly note that) but deciding whether the word has taken root deeply enough to count as part of the language.

Read another response by Allen Stairs
Read another response about Language