Can You Tell Me How Software Company Recurit People, How Do They Conduct Test And Interview?

i want to on which basis they select people to software companies like Infosys, TCS, wipro and other company. how do they select people in each rounds such as test, tech interview and HR intervies. because those who say i did well some times got rejected and people go said i have not done well have selected.
upon which criteria people are selected from aptitude tests.