There are many ways to do this. It can be done with css only, or with javascript, or in its simplest form just by using the html "title" attribute.
Example with the title attribute:
Example of a css solution:
https://www.w3schools.com/css/css_tooltip.asp
There are also a couple of more or less complicated dev scripts with more or less advanced options, like:
There is also ReferencePopups, which is a very useful tool with its main purpose to show references on hover, but which has also a custom popup feature that can be used like tooltips (demo here).