Here is a couple of ways you can deal with unwanted messages from people you don’t know or people who annoy you. What I usually do is just send the message below to make them think I blocked their text, but their texts will still come through. They usually stop texting right away when they see this below message.
Free Msg: Receiver 3743532 unable to receive message – Message Blocking is active“.  This message is one sent by carriers when a person enables all messages blocking or they don’t pay their bill on time.   You can change those numbers  to whatever you want.

Samsung Note 4 / Note 5 / S6 / S5

If you want to block messages on Galaxy S6, Note 5 or even Galaxy S5 Samsung Touchwhiz android which is the most commonly used system–you can usually go to the SMS message you want to block, and then in the top right corner tap More–you will see “block settings”. In block settings, you will be presented with options for blocking calls or text messages. Different versions of Android have different ways to accessing the block settings. Cyanogenmod makes it even easier–when a person taps on the 3 dots in the top right corner, they will see “add to blocked caller list”.

Block SMS text messages Galaxy Note 4

Alternatively you can also try text blocking apps on the Google Playstore.

iPhone 6s (iOS 8 and iOS 9)

  1. Navigate to Settings >> Messages
  2. Scroll down and tap on “Blocked”
  3. Tap on “Add New…”
  4. iOS 7 will then bring up your contacts.  Scroll and tap on a contact to block messages.