The graduate school application process usually begins in earnest the summer before your senior year, but you should start building the groundwork two years before you anticipate graduating. You will likely be confronted with an overwhelming set of options, but it is good to develop a plan early. Most of your options will share a common set of requirements, such as GRE scores, a personal statement and letters of recommendation. If you plan for these items early, you can position yourself to be competitive in the admission’s process.
Some specific advice can be found here: Kisses of Death in the Graduate School Application Process.
Phillip Guo (University of Rochester) shares his perspective in Advice of PhD Program Applications.