Google messages is finally getting end-to-end encryption, which means your messages will be secure from prying eyes. It was under testing since last year.
To take advantage of the new feature, you and the person you message must both use the Messages app and have chat features enabled.
Keep in mind though that end-to-end encryption does apply to SMS/MMS messages and group messages. If you have a lock button attached to the send button when you write a message, you know that its end-to-end encrypted.
According to Google,
When you use the Messages app to send end-to-end encrypted messages, all chats, including their text and any files or media, are encrypted as the data travels between devices. Encryption converts data into scrambled text. The unreadable text can only be decoded with a secret key. The secret key is a number that’s: Created on your device and the device that you message. It exists only on these two devices.Not shared with Google, anyone else or other devices. Generated again for each message.Deleted from the sender's device when the encrypted message is created and deleted from the receiver's device when the message is decrypted.