Usually first author is one who have done the work as a sole responsible person -- i.e primary investigator. For the corresponding author it is usually the one whose idea is being researched and the rest of the others depends on their part of contributions.
1. people who have done hard work to carry out the experiments and to prepare the manuscript with proper referencing
2. people who have thought of the experimental
3. If u r a student, then the guide(s) who have guided you
Unfortunately sometimes, people who had done hard work, do not get authorship. and sometimes, people who are not at all involved in the research, get authorship because of their position.
Apart from authorship, the authors must acknowledge the people who have helped to complete the research work, to typeset the manuscript. if there is financial help provided that also should be acknowledged.