There is not one single way it is done.. Each school does it differently. One school might average repeated grades, another may take the highest grade. Each school also looks at different GPAs ie: cum GPA, last 45 credit hours GPA, prereq GPA.. Some schools ( UTK in particular) look at separate Math/ science GPA and animal science / Biology GPA.
The only way to figure this out is to research schools your interested in and figure out how they do things.