For Google specifically, it helps if you have some coding experience, and some courses in algorithms / data structures. If you're a freshman or sophomore there's Eng Practicum, which has pretty low requirements (here's the one for 2016). For normal internships see here. After applying, recruiters look through applications, if your application looks good they send you on to phone interviews. Those will be technical interviews where you'll be asked to do some coding.
Generally getting into an internship is not as hard, though it is harder at the large companies. (My summer internships at local places consisted of showing up and having 0 technical questions asked - much easier :P) If you're set on a large company, definitely do some interview practice (look for example interview questions) so you know what to expect. Code more, be comfortable writing code. And, apply to many places.