Yes, the previous grade received in that class will remain on your transcript. For the first 16 units of repeated course work (usually 4 classes), the second grade will be the grade used in calculating your GPA. Once 16 units are repeated, then the first grade is not replaced and both grades are used to calculate the GPA.