How to display information about a word when you click to it?

I want to implement displaying information about a recognized word when clicking on it. I recognize an image on a word and output the recognized text. How can I make sure that when I click on a word, a window appears with its meaning and explanation? Is there code or plugins for this?