It's currently three years.
Not exactly. In practice, it can be up to 4 years, depending on when you arrived, and when you start your course. This is because on the first day of the first academic year, which is defined as 1 September for courses in England that start in the autumn, you must have the full three years behind you.
So if you arrived in the UK on 2 September 2011, you will only be home for a course that starts 1 September 2015.
Of course there are some courses that start at different times of the year, in which case the "first day of the first academic year" will be defined differently, but most start in the autumn.
And this is just England. The others countries in the UK have slightly different ways of doing it.