A couple questions regarding graduate studies I am currently a first year physics undergraduate in a obscure university in a obscure country. My goal is to continue on to obtain a PhD in physics from the best university I possibly can in order to put myself in the best possible network of researchers and academics so I could maximize the quality of my own research. However there are a couple of questions I have.  

a) Considering the fact that I've failed my first year at the university and am retaking failed subjects, how is that fact going to affect my prospects of continuing my education (Masters and/or PhD) ?  

b) Since it impossible to get research experience as an undergraduate in my country, what can I do to make up for that as an undergraduate? 

c) How actually is important undergrad GPA for graduate studies? How are GPA scores interpreted in admissions, meaning what admission officers use them for?

d) Considering that my interests are in theoretical physics, is it really important to be in a high ranking institution, and if so why?
In addition to ensuring that you get high grades on your retake (as stated by scaaahu), I would recommend that you get involved with research projects early on and try to get publications out of them-this might compensate for any poor performances in your undergraduate studies. Since you've mentioned this is impossible in your country, perhaps you might want to try and do this abroad during your holidays. Also it might still be possible for you to attend conferences and submit abstracts or posters. It is not the end of the world if you've failed some courses in your first year. In some universities, the first year doesn't count towards your overall GPA. I would advise that you check this with your university.

Generally speaking, the higher the ranking of the university is, the better your career prospects. Of course, if you work with "important people" or highly respected research groups in your field, it might not matter so much.