You may repeat a course offered in the Faculty of Arts once. Other faculties may not permit students to repeat courses, or allow it only if you did not pass the course.
You may not receive credit for a course twice.
The grade you received in the course will always count toward your overall average; you cannot replace the grade by repeating the course.
It’s rarely advised to repeat a course, unless you need it to meet a requirement or you’re very keen to master the subject, and are aware that you will not receive credit for it again, and that the grade cannot be replaced.