The only way to do it without paying for an app is to put your phone in Do Not Disturb mode and only allow calls from people on your contacts list. Settings > Do Not Disturb; Allow Calls From - Contacts. Then place your phone in DND mode by swiping up from the bottom of the screen and tapping on the little moon icon.
Welcome to iMore! There are apps and services available to help you with unwanted callers. One such iOS app is [URL="https://itunes.apple.com/us/app/call-bliss-silence-calls-text/id575698521?mt=8&at=10l3Vy]Call Bliss[/URL]. It's $9.99 but that's a small price to block hundreds of undesired calls IMO.