This article explains how to prevent a person from being able to contact you on an iPhone, wanting to block them for bothering you or for any other reason.
Steps

Step 1. Open your iPhone Settings
The icon looks like a gray gear and is located on the main screen.

Step 2. Tap Phone
It is the fifth section of the menu.

Step 3. Tap Call Blocking & Identification
It is the second entry in the "Calls" section.
A list of all previously blocked contacts and phone numbers will appear

Step 4. Tap Block Contact
It is located at the bottom of the screen.
If the list of blocked users extends beyond the screen, you will need to scroll down

Step 5. Select a user to block by simply tapping their name
They will no longer be able to contact you via phone calls, FaceTime calls, or text messages.
- Repeat the above steps for all the contacts you want to block.
- You can unblock a contact from this menu by tapping "Edit" at the top right and selecting it.