A friend of mine just got out of a rough relationship. Unfortunately it didn't go well as her ex was calling and texting her nonstop to both try and win her back and insult her (I did say it was a rough relationship). After a few days, she just couldn't take it anymore and came to me for help in blocking this guy.

Luckily, I already knew a number of options for blocking people who are being a nuisance, from annoying exes to rude telemarketers who won't take "no" for an answer. Now I'm betting that more people than just my friend occasionally need to block someone who is annoying or even harassing them, so here I'm going to share a few of these options.

First, though, I do want to say that if the person harassing you is threatening you with physical violence, stop reading right now and go straight to the police. They'll probably have you file a restraining order. Once that's done, then come back and learn how to block the person.

Of course, you don't usually have to get law enforcement or the courts involved. The annoying person might just be someone who you gave your number to one time without thinking about it. Here's how to get your peace and quiet back whether you're on a smartphone or an old flip phone.

 

Smartphones

 

Given that nearly everyone wants to block someone at some point, it's no surprise that smartphones with the latest versions of Android, iOS and Windows Phone have blocking built right in.

In Android, open your Phone app and go to Settings>>Call>>Call Rejection>>Auto Reject List>>Create. Put in the person's name or number and their calls and texts will never make it to your screen. They can call and text all day and you'll never be bothered again.

Because each manufacturer tweaks Android a bit, you might have to hunt around for the settings on your specific gadget. If it just doesn't have blocking, you can add blocking with an app like Mr. Number.

On an iPhone or iPad with iOS7 or higher, you can block FaceTime, Phone and Messages contacts you don't want communicating with you.

Apple iOS

If you're in FaceTime or the Phone app, go to "Favorites" or "Recent" and find the person you want to block. Tap their name, then tap the "Info" button, scroll to the bottom and tap "Block Contact." If you're in the Contacts screen, just tap the contact, scroll down and tap "Block Contact."

For blocking Messages, tap a message from someone you want to block and then tap "Contact" in the upper right corner. Tap the "Info" button, scroll to the bottom and tap "Block Contact."

You can edit your blocked contacts later in Settings>>Phone>>Blocked, Settings>>Messages>>Blocked, or Settings>>FaceTime>>Blocked.

Windows mobile

On a Windows Phone, go to Settings and tap "call+SMS filter." Tap "Accept" and then switch blocking to "On." Next, go to your call history and tap and hold the number you want to block, and tap "block number."

If the number harassing you is a robocaller or telemarketer, you can block it this way, or block all robocallers and telemarketers at once. Just add your smartphone's number to the Do Not Call registry. The annoying calls should stop in about a month. Click here to learn more about the Do Not Call registry's history, how it works and the truth behind some common myths.

Do Not Call works on your smartphone, flip phone or home phone, which reminds me ...

 

Non-Smartphones

 

The above information won't do you much good if you're on a flip phone or other non-smartphone. Thankfully, you can still set up blocks with your carrier.

All four of the major carriers will block numbers from calling or texting your phone. Most require you to shell out a $5 monthly fee to block numbers. Sprint is the only exception as it allows you to block some numbers for free.

AT&T's service is called Smart Limits. Once you're signed up, log onto MyAT&T and hover over "Wireless" to see "Smart Limits." Select it and then choose "Blocked Numbers" to add a number. It costs $5 a month for one line or $10 a month for up to 10 lines.

If you have Verizon, log onto MyVerizon and find the Family Safeguards & Controls section. The free Block Calls & Messages feature lets you block up to five numbers for 90 days. After 90 days, you'll have to manually block the numbers again. If you sign up for the paid Family Safeguards & Controls, which is $5 a month per account, you can block up to 20 numbers indefinitely.

For blocking on T-Mobile, you need Family Allowances. In the "Family Allowances" menu in your account, select "Allowed Numbers." To block a number, you have to add it to the "Never allowed" section.

Finally, Sprint customers can sign into My Sprint and go to My Preferences>>Limits and Permissions>>Block Voice. Choose "Block only the following phone numbers for inbound and outbound calls." Add the number and then click save. You may have to restart your phone.

It works the same way with texts, but you'll choose "Block Texts" instead of "Block Voice." You have to block the number in both areas to cut off communication fully.

 

Landlines

 

There are times you might want to block a number from calling your landline. Check with your phone provider and see what options they have available.

You might be thinking about ditching your landline completely to save money. Here are three reasons you might want to keep it.

Kim Komando hosts the nation's largest weekend radio talk show as she takes calls and dispenses advice on today's digital lifestyle. Visit Komando.com for free podcasts, videos, product reviews, shows, tips and advice.