How to compensate for previous low grades when applying to PhDs in the UK? I want to know how to compensate a low overall grade for past education for a Ph.D. application in computer science in the UK ?
Thanks
It's not clear what you consider to be a low grade, or whether you are already in the UK. This answer assumes that you have a low 2:1 (i.e. 60%-65%) and have obtained your degree(s) in the UK.
If your highest qualification is a BSc, you can compensate for a low overall mark by one or more of the following:

Get a Master's degree (preferably a research-based Master's) and do well in it
Get some research experience either independently, through your workplace or through someone at your local university
Make sure you have excellent reference letters from three reputable academics, of which at least one can talk about your research ability and experience in detail

If your highest qualification is a Master's and the poor marks were in your BSc, you have already demonstrated that you're on an upward trend and there's not much more you can do. If your highest qualification is a Master's but the poor marks were in that Master's, there's not much you can do about that, unless you have a very good explanation as to why that might be (mitigating personal circumstances, perhaps). Again, having a referee who can vouch for you will go some way to compensate for that.
However, it's worth bearing in mind that if your degree is classified below a 2:1 (i.e. a 2:2, 3rd or pass), your application may be screened out before your references are even read. It's possible to get around this if you have someone on the admissions committee who will vouch for you, but this presumes that you have already contacted a potential supervisor who understands why your grades are poor and is still keen to take you as a student.
Note that we have a wiki question on this site that is US-focused, but much of the advice is also applicable in the UK: How does the admissions process work for Ph.D. programs in the US, particularly for weak or borderline students?