If you want to send messages without worrying that other people might be poking around in the texts you're sending, you should be using an encrypted messaging service.
There's never a true guarantee that what you're doing writing isn't going to be viewed -- often our own mistakes can lead to vulnerabilities that leave us wide open, but using encrypted messages is certainly a step in the right direction.
If you're unfamiliar, encryption helps jumble the content of a message into random data until it's received on the other end and the original message is compiled back together again. This means if anyone intercepts the message -- a hacker for example -- it's mostly just jumbled characters and symbols. Keep in mind that this doesn't protect your messages from being seen if your device is ever compromised — if someone has access to your phone (or the person you're sending messages to) they can read the messages.
If you want to encrypt your messages on iPhone and Android, here are some tips.
If you're on an iPhone and texting to someone who also has an iPhone, your messages are already going to be secure thanks to the encryption keys Apple already keeps in iMessage. This isn't the case if you're sending a regular "green" bubble text message to another phone that isn't an iPhone, it's only the case with "blue" bubble messages between iPhones, iPads and Macs. If you're on Android, move along to the next step. iMessage is probably the most fun of the encrypted apps, too, since it supports third-party apps, the ability to pay people with Apple Pay Cash, Animoji and more.
One option for Android and iPhone: Signal
One go-to app for folks who want encrypted messages is Signal. It's available on iPhone and Android and is really easy to use. First you download the app then register your phone number. On Android, you can even set it to be the default messaging app (though again, you'll want to make sure you're sending messages to someone who's also using Signal to ensure encryption.) When you send a message to someone without Signal, it will ask you to invite that person to use the app. Do this and your messages will be encrypted.
Signal also has additional security features including options to block others from taking screenshots, disabling keyboards that learn from what you type, and the option to set a password to open the app. There's an option to make messages disappear after 5 seconds, which is convenient if you're worried about someone going through your phone.
Finally, Signal shows you the "safety" number that you can compare with the person you're chatting to to make sure that the conversation is secure.
WhatsApp works on phones and the web, too
WhatsApp is another option that works for Android and iPhone. Like iMessage, it also offers end-to-end encryption that theoretically keeps the contents safe from anyone outside the WhatsApp conversation. WhatsApp doesn't require you to change any settings -- everything is already encrypted by default. It also promises that it doesn't store any of the messages on its servers, which means your messages are kept locally on the phones they're sent and received from. WhatsApp also has a web interface, so you can chat from a web browser on your computer, too.