Any time you earn a less-than-optimal grade, you will want to raise it in the fastest way possible. Earning an F, for example, looks bad and lowers your cumulative grade point average, or GPA. If you retake the same course and get an A, your GPA no longer suffers from the negative impact of that F. In fact, your new grade raises your GPA. When your cumulative or average GPA is calculated, only the most recent grade from your retaken class is considered. So, as regards your GPA, it is as if that F never occurred.
When you consider retaking a course, consider the reasons you may have had for getting low grades the first time. If unique and unusual circumstances caused you to miss classes or interfered with your ability to study, your professor may grant you an incomplete grade in lieu of a bad grade. With an incomplete, you can complete your missing work or make up class periods during the next term in order to earn a better grade. If your professor will not grant you an incomplete, and the cause of your initial bad grade is unlikely to reoccur, then retaking the class may be a viable option. If the course was simply too difficult for you, you may find it easier to retake after some time has passed and you have taken the necessary prerequisites. If the course is outside of your major, or if you earned a passing grade but would like to have earned a higher one, it may be worthwhile to live with a bad grade instead of devoting your energy to changing it.
Although you may raise your GPA by retaking a course, your transcript will still show that you took the course more than once. The original bad grade is also recorded on your transcript, during the academic term in which you earned it, and may draw some attention when you apply to graduate programs. Making a habit of retaking courses will pepper your transcript with undesirable grades. If you find that you often need to retake courses within your major field of study, it may be more prudent to pursue a degree in a field that comes easier to you or holds your attention better.
You have to pay tuition again to retake a course. If you pay your tuition with student loans, scholarships or financial aid, you will run out of money more quickly by retaking courses. This can jeopardize your ability to pay for future classes, which then jeopardizes your ability to earn future financial aid. If you work to pay for school, you may have to work more or longer shifts to compensate for the added cost. Retaking courses also costs you time, as each course you retake requires you to push one other course back by a semester. As tuition costs tend to rise every year, too long a delay can leave you paying more for your final classes than you would if you hadn't paused in your academic progress to retake old courses.