At a basic level, the Glossary activity in Moodle is used to create a collection of entries, much like a dictionary or encyclopedia. The content within a given entry can contain text, images, videos, and more. Teachers can configure the Glossary to permit students to post, and their entries can even be graded. Glossaries can be configured in additional ways, such as an FAQ to provide answers to common course questions, and words that appear in multiple entries can be automatically linked to one another.
The official Moodle documentation is pretty helpful and contains an excellent introductory video outlining the tool. In addition, at the bottom of the page are links that cover all configuration options and usage examples.
To add a Glossary activity, click the gear menu in the upper-right of your course, click Turn editing on, then click Add an activity or resource in the section you want it to appear, then select Glossary from the list.