Ask in the prepharmacy forum what pharm schools do.
For allopathic med schools,via their application service AMCAS, a retaken grade is averaged into your application GPA, just as if you took another course. There is no reason to retake any courses except the prerequisites if you got a bad grade. An exception would be if you got a C in the first course of a series, then an A in the second course, you probably don't need to repeat the prerequisite course unless you didn't understand it well enough to kill the MCAT. If you want to retake, it could be at the same school, if they allow it, or at another institution. All transcripts must be submitted when you apply.