It all depends whether its a core or elective subject. If its an elective then you can choose to do it again, knowing you already have a recorded failure on it, or probably be wise to choose another elective if you can. If its a core subject in your course then yes you will have to do it again, and usually not long after you fail it. Its up to you when you repeat it, but if you need the subject for another subject (prerequisite) then you will have to do the subject the next semester obviously. If your in first year, then usually this will be the case and you will have to do it the semester after as subjects tend to follow on in the 2nd year. Again it all depends on what subject it is.