Can you block someone from-calling and texting you on an iPhone?

Someone I don't want talking to me is text and calling me so I was wondering if it is possible to block them from both texting and calling you on a iPhone?

Yes it is possible to block them.

You can try and call your carrier. Although, I haven't had much luck doing that but it may be different for each carrier.

If you're not afraid to jailbreak your phone, you can jailbreak it then go into Cydia to download iBlacklist. IBlacklist will allow you to block specific callers/texters. The app does cost a tiny bit of money. If you're knowledgable, you can find a way to pirate it for free. I don't particularly condone piracy, so I won't expound on those methods but at least I've pointed you in the right direction.

I have an iPhone and I have not yet seen a feature that allows that (pre-installed). I'm new to the iPhone, though.

If you have T-Mobile, you can call and sign up for Family Allowances. You can then log in to your account on T-Mobile and block calls and/or texts from certain numbers.