Apple has added a spam filter to the Messages app in iOS 8.3. You can turn on the filter by going to Settings > Messages, then tapping the "Filter Unknown Senders" slider.
Your Messages app will now have two columns: Contacts & SMS and Unknown Senders. All messages sent from people who are not listed in your contacts will be added to the Unknown Senders list.
You can view all the filtered messages by simply tapping the Unknown Senders tab. From here you can either block a phone number, add a phone number to your contacts, or tap the Report Junk button under the message to delete it.