You don't get kicked out for failing. If you take 'unduly long time' to make progress in your degree, though, you get excluded and have to make a case to some committee. The amount of time varies and is outlined in the relevant handbook for the degree and year.