OK, it really depends how rigorous your academic program is, and what your future plans are, however:
You shouldn't have a string of W, or D or C on your academic transcript. One or two is acceptable but not several. I know this because mine does, and it limited my future. If you retake a course, you should get an A or a B+ at worst the next time. All of this should apply to any course, from mathematics or physics, to your core requirements (literature, sociology, etc) and absolutely to courses in your major.
If your transcript isn't mostly A and B, with only one or two C or D or W or F on the page that you can explain away as my dog died, broke up with significant other, or the like, then your academic adviser won't write a letter of recommendation for a graduate program, or medical school, or elsewhere. (They will write a job recommendation however.) Again, I know this first hand.
It was said to me, and I may have tuned it out at the time, but now that its written down, maybe everyone can benefit -- you're not in high school anymore. There is really no place in academia for barely passing. In fact, A is "barely passing", you have simply lived up to the standards required. A B means you have missed something important, something you should have picked up, applied practically, and communicated effectively. Anything less means -- you have selected the wrong major.
I know that all sounds harsh, and I wasn't absolutely held to that standard either -- we were graded on the curve because high school kids demanded it and professors caved in to pressure. But as much as they can, they tried to hold university students to a much higher standard.