Both iOS and macOS have dictionaries to know the meaning or translate. There is a wide variety of languages, so you can choose the one you want.
So, when you are on a website, or reading a book, press and hold the page you are interested in and a menu with the "Browse" option will appear. If you do it with macOS press control + click (right button) and you will have the possibility to consult in the first position.
As you can see in the iOS screenshot, first you have a definition in the language of the word (in this case in Spanish) and then the translation. If you click on each of them you will have a lot more information.
You also have Siri search data, in this case the proposal is Wikipedia. And finally the films related to that word.
In macOS it's similar, except you have to switch between dictionary, Siri, movie ...
If you want a word to be translated for you, since you have installed a translator dictionary, click on query and it will appear in your language.
Set up dictionaries
In iOS go to Settings> General> Dictionary and add the ones you want. You will see that there are dictionaries of only one language (with definitions) or dictionaries with two languages (translation).
However, in macOS you configure it from the Dictionary application that you find along with the rest of the applications.
They are not all the languages of the world but the main ones are.
Usa Siri
You can also ask Siri what something means, you just have to tell him to define that word. For example: "Define potato".