How do you block a number from text messaging you?

If he calls you, then block his calls at that time. It should also block all text from him.