We have a variety of ways to determine author order. The most important thing is to agree on one at the outset – possibly by having a normal order for the group. Common possibilities:
Student first: If student and advisor author are publishing about the student’s work, or about work to which the student has made a nontrivial contribution, the student is first author.
Writer first: If a group of peer collaborators publishes regularly, the one who did the heavy lifting on this paper goes first, followed by the others alphabetically
Alphabetical order: List the authors in alphabetical order. Disfavored by people who come late in the alphabet.
Contribution order: List the authors in order of significance of their contributions. Offers unparalleled opportunity for politics and infighting.