How are the dancers’ placement in a song determined?

So I have been noticing dancers more than the hero or the heroine nowadays. And I did find four or five guys constantly appearing next to the hero or in the line right behind the hero. How does their placement happen? Based on the talent or based on the seniority? I am just curious to know more about the back dancers.