To be eligible for an award, you have to be resident in the UK, not for the purposes of education, for three years before your postgraduate study begins. Different procedures may apply if you are from Scotland, Northern Ireland, the Isle of Man, or the Channel Islands. If you are a national from another country in the European Union you usually can't apply for a full award, but you may be eligible for a fees award from a research council. There are not nearly enough grants to go round. You usually need a very good class of degree, and even then you might not be successful.
Many students get a place but no funding.