In December, my brother graduated from OCS (Officer Candidate School) for the Marine Corps. My uneducated explanation of OCS is that it's an elite version of boot camp, designed to test your leadership. Officer candidates come from all over - enlisted Marines, ROTC programs, normal college grads with no past military experience (like my brother). He had to go through tests/screenings just to make it in to OCS, and then OCS itself is a screening (he always referred to it like a job interview) that last 10 weeks and tests you physically and mentally. They are out through physical tests, tested on Marine Corps history, tactics, policies, and evaluated on their leadership skills. I can't remember the numbers now, but I'm pretty sure something like half the candidates don't make it to graduation.
My brother is now a Second Lieutenant of the Marine Corps - he outranks 90% of the Corps. Ninety percent. That's like... almost everyone. Other guys salute him now, even some of his drill instructors and the Marine who recruited him. It is crazy.
Side note, if you ever find yourself in the DC / Quantico area, make sure you check out the Marine Corp Museum. It is really, really cool what they've done with interactive exhibits, organizing the history of both the Marine Corps and of the U.S.