On most Android devices, text and call blocking features are built into the device. Please see below for the steps, your device might look different due to software version, but steps would be similar.
How to Block Text Message
Go into your text message inbox, pull up the text messages conversation with the number you wish to block, select More at the top right hand corner.
Select Block number
Toggle on Message block, Call block, or both, then click OK.
After numbers are added, you can manage numbers you have blocked, to learn how, click HERE
How to Block Calls
The above method works for blocking calls. The method below shows how from within the phone app.
From your call log, select the number you wish to block, tap More.