To emphasive something in narrative, or as an adjective. Or when something doesn't go right, and I need to exclaim my dissastisfaction. It also depends on the company I'm with. When I'm around my parents or my sisters, I usually never swear, and especially since my niece and nephews were born, I've had to be mindful of my language around them.
However, when I used to work construction, and everyone around you is a hard-working, hard-drinking man, with a smoke constantly dangling out of their mouth, the language obviously changes, and "fuckin" becomes a prefix in nearly every sentence. But then, once again, when you're working around the public, even with those guys, one must be mindful of one's language, lest someone else become offended. I usually don't get offended with other people's foul language, unless it's in completely inappropriate company, then I have to step up and assert the status quo, even though I swear somewhat regularly myself. So I swear for many many different reasons, but I always try to stay mindful of when it's appropriate or not.