Nearly a year after it was first announced, Messages in iCloud is finally available. All you need to enable it is iOS 11.4 on your iPhone or iPad.
You’ll almost certainly want to turn this feature on as it improves on the sort of half-baked syncing feature that was the only option in previous releases. Before, if you were signed into the same Apple ID on your iPhone and iPad, then the Messages apps on each device would simply show incoming messages at the same time. As you replied back and forth, each device updated the conversation threads in unison.
Messages in iCloud fixes all that. It stores all your Messages (iMessages and SMS texts), including attachments and images, to your iCloud account and syncs them between devices. All your devices always have the most recent state. If you delete a thread, it deletes everywhere. If you set up a brand new device, it will have your entire Messages history.
Jason Cross from MacWorld