You can apply for a UK Ancestry Visa if you are a Commonwealth citizen and one of your grandparents was born in the UK, the Isle of Man, Channel Island or a British-registered ship or aircraft before 31 March 1922. You will need to demonstrate that your grandparent is your biological grandparent.
You will be required to demonstrate that you meet the eligibility requirements, namely that you are 17 years of age or above, you are able to satisfy the accommodation and maintenance requirements whilst in the UK, and you can work in the UK. You can study and work on this visa route.
Once you have completed five years on this route, you will be able to apply for indefinite leave to remain, subject to you meeting the other requirements.