Answer by Vikesh Khanna:
I am joining Stanford's MSCS program this Fall. This is from my experience of applying to the universities this year. The ideal way to get an MSCS admit from Stanford, or any other university for that matter, is to have a strong academic profile. The admission committee evaluates your ability to do well in their curriculum, and also sees your interest in research.
A strong academic profile means
- A high GPA (more importantly, a great departmental rank/Institute rank)
- Good Letters of Recommendation – From people who know you personally. I had three (3 for Stan, 2 for others) LORs from my undergrad professors and one senior from my company.
- Good Statement of Purpose – Don't make it look like a resume. Talk about your strengths but more importantly talk about why you want to pursue a Masters and how those strengths will help you in that pursuit. Talk about your work experience, your academic interests but all in the light of your purpose in life.
- If you are still a student, try to get a research internship at a university, or an internship in a respected R&D lab. If this doesn't work out, go for a respected tech. company.
- Projects! Do undergrad projects that are relevant to your area of interest.
- If you can manage – publications! Research papers published in a good conference are considered very highly in a grad application.
- Good GRE & TOEFL – These exams usually act as filters. If you have a low score, you'll get rejected immediately but a high score may not necessarily mean admission. Be on the safe side, get a good score.
Now, all this is fine, but the most important thing really is introspection. Why do you want to pursue a Masters? Do you have an academic interest in a particular field? This is important because your entire profile has to justify your purpose of pursuing advanced studies. Your LORs, SOPs and resume have to be coherent. For instance, if you are mentioning in your SOP that you want to study Machine Learning at an advanced level – justify it everywhere. Let your resume qualify that you have an internship in a similar field – big data, perhaps. Get your LORs from professors who praise your mathematics, statistics and grasp on computer science skills related to machine learning. Flash a research paper on Machine Learning! Let your SOP mention your hobby projects, the courses on Coursera you took out of interest, the professors you might want to work closely with at that university, find out what these professors are working on and mention that you are enthusiastic about those projects. It should all be connected and coherent justifying your purpose of pursuing the Masters. To have all this in place, it becomes really important to start planning early during your undergrad.
Specific to Stanford:
I didn't start early enough, unfortunately. I didn't have a spectacular GPA (it was just decent) or a research internship. I didn't have any publications either! My research profile was pretty weak. It was no surprise that I didn't get admits from most of the schools ranked around Stanford. But I realized that Stanford is different. Its MSCS program is actually a terminal masters degree and is considered quite independently from their PhD. My entire application material was fine-tuned for Stanford because that's where I really wanted to go. But the good part was that all my material was really really coherent, and that Stanford did care about things apart from research experience.
I had one compulsory thesis project in my last undergrad semester which I did on audio fingerprinting. My interest is in Machine Learning and NLP. Audio analysis falls loosely under Natural Language Processing (+). During this project, we had worked on a couple of open source projects  (+). I had also taken Andrew Ng's ML courses on Coursera out of interest last year (+). I had plenty of hobby projects (Chrome extensions, Windows Phone apps, python scripts for music management, Django websites) etc. on my github page . My LORs particularly talked about my performance in mathematics and algorithms, in which I had good grades. There were also personal experiences I had with these professors where I had specifically gone out of the way and done something – like implementing a heap for optimizing a networks assignment when one was not required. Also, I specifically took reco from a professor who taught me Theory of Computation (grammars, automata etc). I had good grades in this course and it supported NLP potential quite well (+). I was involved with the Entrepreneurship Cell at my college and had built their website in Django  (+). I was the co-founder of a startup in college that lasted for a couple of months (+). Stanford is known for its entrepreneurial cultural – so I mentioned this in my application. I also have two years of work experience at Microsoft where I worked on Windows Azure services. Although this was not related to ML or NLP, most of the work involved was relevant programming that would generally help any CS grad student. I have also been playing some music for a while. I was the guitarist in 3 performances ofat Microsoft – particularly Microsoft's philanthropic event called Giving campaign . I had a stint with Basketball in school – a couple of medals for being in the winning team, nothing spectacular. I mentioned this because Stanford seems to value their sports a lot.
All this is OK, but the fact that I didn't have a great GPA and internships greatly jeopardized my chances of making it. So, do it the right way. Have a good academic profile and start early. I think it worked for me because they do say that if you really want something in life, a very efficient divine algorithm makes it happen. 
: Blatant self-promotion. Our band covering Another Brick in the wall :
: Slightly edited from Paul Coelho and Om Shanti Om's original dialogues to suit the taste of the intended audience.
Bonus Link (one of my rather silly github projects):
(+): 10 points to Gryffindor! I had highlighted all this in my SOP.