Best way is a loaded question.
Code:
sudo apt-get update && sudo apt-get install libreoffice
would be one way.
Sometimes I prefer the Package Manager (
Menu> Preferences> Package Manger) as it's easier to get the proper spelling on package names. If it has been a while since the Package Manager was used,
Reload, to update the list of available software.
The Ubuntu Software Manager works as well, and is perfectly acceptable to use, but tends to give less feedback as to what is going on in the background.
It's your decision.