It does not matter how they do it, but the ball must arrive at the trainer.
Trainer may not take more than one step to get the ball.
The ball can also be played to the trainer in two or three times.
When there are 7 or more players the same thing can be done at the other side, but then instead of a trainer there is a player at the net.
It is important to make sure that the ball is passed to the trainer.
If there are extra players, someone can stand in the queue.
If the ball falls to the ground, the substitute will take that spot. (In the case of a large difference in level of play the substitution can be made as well).