We would advise you first and foremost to give your best at school, whichever career path you chose. It’s also important to learn, particularly for a career in F1, that most often success comes from sustained hard work as opposed to occasional displays of brilliance.
Specifically though I would advise you follow the numerate disciplines for your GCSEs and A-Levels i.e. Maths (essential), Physics, Chemistry, Design & Technology, IT etc. You should eventually aim to do a degree in an engineering discipline i.e. Mechanical, Automotive or Aeronautical. As for choice of University or college, with Cambridge, Imperial, Brunel, Bristol, Loughborough and Southampton being popular high-end choices for F1 hopefuls.
It is also important to get practical experience, so try to use your vacations or gap year etc to get some. This could be paid employment in a garage or workshop or even voluntary labour for a junior race team. When you get to University joining the Formula Student Team is a great way of getting really good hands-on experience, as well as being a lot of fun.