Well duh… to research of course. Research is by far the most important factor in whether or not YOU get into graduate school in Physics. Yeah, the GPA and the GRE scores are important, but a solid history of research and, if possible, a published paper will cause your application to reach the next level of awesomeness. Without research, your application is just mediocrity incarnate, even with that perfect 4.00 and 990.
If at all possible, begin doing research as early as possible. Since you’re a total nerd and have known you want to do physics since the age of 12 when you first read about Einstein’s General Theory of Relativity while watching the original Stargate movie, you’re in a much better position than all those other undergrads who want to explore their liberal education. After all, we know that they’ll just end up as English majors once forced to pick an actual specialty… but I digress. During your freshman year, start talking to your profs about the type of work they do! You won’t know enough, presumably, to do anything big, but profs are always looking for poor souls to code or run experiments for free during the Summers.
Doing research for a professor will foster a positive relationship (hopefully…don’t break anything!), and open up the possibility of them writing you letters of recommendation, which will be crucial in conveying who you are to potential graduate programs. However, you may choose to do research outside of your own institution, in which case you should look into REU programs. Research Experience for Undergraduate programs consist of neat Summer projects which send you off to some fun place where you get to partake in cutting edge research while experiencing a novel cutlure. What better way to spend Summer than analyzing spectra at the American Museum of Natural History in New York City, or calculating radial velocities of nearby stars while lounging on the beaches of Hawaii?
So the question then becomes, how do I make myself competitive to get into an REU program? Well, obviously good grades can’t hurt. However, there are certain skills that can put you in the lead when applying, especially if the REU program is one in astronomy. Take a programming class as soon as humanly possible! Start in High School, and keep going with it. Programming is under-emphasized in all astronomy and physics undergraduate programs, but crucial to the day to day workings of a professional astronomer/physicist. In most programs it is simply assumed that you will pick up the skill as you work, which I think is idiotic. The sooner you know how to properly apply ‘if/then’ statements, ‘for’ and ‘while’ loops, and scripting, as well as a working knowledge of the basic structures available to a programmer (and how to manipulate them), the better off you will be. If you plan on being an astronomer, then it’s good to know that the field is moving away from IDL due to the fact that it has become enamoured with Python. Furthermore, there is quite a bit of drive to standardize file formats (lead by a NASA initiative), and it looks like the FITS format is slowly becoming the standard of choice.
Physicists are a lot more all over the map. A working knowledge of Python, C, C++, and Fortran is nice to have. In simulation work I am constantly encountering new languages and strange file types (HDF5 is the most awesome file format ever for that type of work). It may sound daunting, but it really isn’t. If you learn the basics of programming, all that stuff I mentioned about loops and structures, then you will be able to apply any of those skills to every language. At that point it becomes a syntax problem, which can always be alleviated by spending a weekend with some code and an online help manual in front of you.
So remember, get started on research as soon as possible. Start taking courses in programming, as well as learning to program on your own as soon as possible. Both will supplement each other. You will become a better researcher by being able to automate tasks with a program, and you will learn to program better as you encounter tougher problems in your research. If you plan on applying to graduate school in Physics and Mathematics, then both of them will give you the cutting edge you need to have a stellar application.