paying back student loan if you fail uniWatch
If you have to leave your course, SFE will stop making any further payments and the total amount you've received up to that point is your repayment amount. This also applies if you leave prior to term 3 - the last tuition fee and maintenance payments won't be made, and won't be added to your loan. From that point, the repayment arrangements are the same as if you completed the course.
Short version: Starting the April after you leave, if you're earning over £21,000 a year your employer deducts 9% of your earnings over £21,000 (e.g. if you earn £22,000, you pay £90 a year). After 30 years, the loan is wiped and you don't pay any more.
During your course, and until the April after you complete/leave, interest of RPI (currently 0.9%) + 3% is added annually. So, when you leave, the balance of the loan is actually higher than the amount you received. That April you start repaying (automatically, if your employer uses PAYE) at a rate of 9% of any earnings over £21,000 per year. At the same time, the interest on the loan depends on your earnings, and is between RPI (less than £21,000) and RPI + 3% (at least £41,000).
The loan is cancelled after 30 years if it hasn't already been paid off. In practice, if you're making low repayments you won't actually reduce the balance of your loan (the interest will be higher than your payments), and the 30 years will probably pass with you paying nowhere near the amount you actually borrowed. If you're making moderate repayments, you may end up paying more than the amount you borrowed over the 30 years, and with high repayments you'll actually pay the loan off at some point. For higher earners, there's some intricacy in whether you should pay off your loan manually to reduce the amount of interest you have to pay.
More info: Student Loans Company