For Ph.D. studies, it is sometimes possible to get funding. The research councils will not allow non-EU students to get studentships, but some charities will allow international students to take them up. One of my former labmates is from China, and the charity funding her project allowed our former supervisor to give her the position. They paid the EU-level fees and a stipend, and she had to pay the difference between EU and non-EU, which worked out to about £7000 and took up a large chunk of her stipend. I was extremely fortunate, and got a university-funded studentship that had no conditions on nationality, and it also paid the EU fees and a stipend; I also got an ORS award to pay the difference, and used my FAFSA loans to help with living expenses. So it is possible, but it's difficult. For taught postgrad degrees there is very little available, and most people I know doing those have used a combination of savings, family money and loans.