Answer by Charan Roshan:
You need to fulfill certain basic needs:
1) Maintain a good GPA in your undergrad(at least 3.2 in a scale of 4) .
2)Get good GRE scores(probably above 330).
3)Involve yourself in extra curricular activities such as music and sports.
4) Present papers based on your fields of interests.
5)Get good TOEFL scores.
6)Prepare a good SOP(Statement Of Purpose).
7)Apply for the Standford during fall or spring,usually spring in takes are quite low.
Usually getting admission in such highly credited institutions is quite tough as it is highly competitive, hence along with your studies try to have good extra-curricular also.