How to block calls on iPhone?

How can I make it so only my contacts can call me? I keep getting a prank call from someone and I'm trying to sleep because I have work tomorrow.

Go into your call settings and there will be an option for only calls from contacts etc

Settings, phone, blocked, add new. In that order!