This sort of thing varies according to the University in question, so nobody can give you a blanket answer. The most sensible thing to do would be to go to the forum specific to the University you're considering, and ask students there. Some Universities don't allow resits at all (Cambridge doesn't)