According to release notes posted on Motorola's U.S. website, the Moto G5 and Moto G5 Plus are both currently receiving an update to Android 8.1 Oreo. Motorola says that this build of Android includes "new multitasking features, more efficient notification controls and improved data saver, battery features, new power menu UI and Bluetooth improvements."
Besides Android 8.1, the update carries the June 1st Android security update and improvements that exterminate bugs and enhance the stability of both models. Motorola suggests that when you receive the notification telling you that the update has arrived on your phone, make sure that the device is connected to a Wi-Fi signal before starting the updating process. In addition, the battery on the handset should be charged up to 50% or higher before you start installing the update.
If you want to install the update manually, go to Settings > About phones > System updates > Download. After the update is downloaded, click on "Install." Both phones were launched in March 2017 with Android 7.0 Nougat pre-installed.