Do this by swiping up from the bottom edge of the screen and releasing quickly. If you're using a non-full screen model, hold your finger against the home button, which will bring you to the main menu of your phone.
Locate the number you want to block. For the purpose of this guide, I've decided to block one of the many spam phone calls I receive. From the list of tabs at the bottom of the screen, I clicked on Recents and found the number.
Once the number is located, click on the little blue lowercase i icon to the far right beside the number. This opens up more information about the number or contact.
From this page, you'll find the option Block this Caller at the very bottom.
If the number is saved in your phone, you'll have a few more options to scroll through, but Block this Caller will always be at the very bottom.
When you press this option, you'll receive a message explaining what happens when you block a number.
If you've come this far into the guide and you're ready to not be harassed, you'll want to press the Block Contact option.
Blocking a number won't delete the caller from your phone, nor will it delete the information from your call log. You'll know that you blocked the number when you click on the informational screen and find the option to Unblock this Caller at the bottom.
With the unwanted number blocked, you can enjoy your now quiet iPhone!