how is first author listed in a publication
The first author (most of the time a PhD student or a post-doc) is typically involved in designing the experiment, running it, analyzing data and writing up. The other authors are mostly involved in some but not all of these steps.