How exactly do graduate students collaborate on a research project?
It's really like any other collaboration. Presumably the (student) researchers are working together because they have a common interest in a problem and possibly have some complementary expertise that's useful for solving the problem. So they'll interact and as the situation merits it will divide up tasks (or work on some aspects together). There really isn't a single rule for this.