Profanity. One of the biggest obstacles in my writing. For the sake of realism, I say. I want my characters' voices to ring true, yet at the same time I don't want parents or a school board banning it, or feeling as though I have forced it on myself. Nor do I want to use it unnecessarily and upset my readers.
Sometimes, I think it doesn't matter. With all the sex, drugs, and cursing that we're exposed to in everyday life, a scene or two in a book isn't going to kill them. But then I remember that the reason so many people read in the first place is to escape from all that.
So what should you do? Stephen King's On Writing and numerous other How-To-Write books will tell you that staying true to your character is essential. If the character is raised in a household that taught no manners, you can't have him speaking with 3rd grade insults. Unless he is in 3rd grade. Some characters brought it in conservative households will say things that would make a nun blush. No matter what, stay true to your character.
However, one way to get around it is saying it without saying it.
In the Newberry Honor Book Egypt Game by Zilpha Keatley Snyder, there's a scene where one of the characters curses but the letters are dashed out. F----! You know exactly what she says but you haven't read it. This is a great way to say it without saying it. The downside, however, is that it breaks the fourth wall which will pull the readers from the story and back to the person writing it. Perhaps, if the story is narrated by a younger person, who finds cursing bad, it'll pass. If you're writing for a certain group, say a religious one, this also will probably be more acceptable.
You can also have a character whisper an insult that makes a teacher turn scarlet red and with a stutter send them to the Principal's office. The reaction to an unspoken insult can also do the job quite nicely. This way, the readers imagination fills in the blank with their own profanity.
Lastly, you can use another language or create your own slang. This way when a reader comes across it, it won't make them cringe as much as if they read the current slang equivalent. However, this also means that it won't have the same effect when one character says it to another.
As always, read a wide range of literature and try to target some of the books that have been banned because of the language. Also, think about how you felt when books held questionable scenes. Were you so put off that you set the book down, or was it easily dismissed? While I agree on keeping true to your character, you should also be true to yourself. Never put out something that you'd later regret.
Good Luck Writing.