It stays on the ISS while it is emptied and loaded for the return trip. Dragon is the only vehicle with a substantial down mass capability (3000kg) so it can return with things that need fixing and completed experiments etc. Shuttle is retired and Progress, ATV, HTV and Cygnus are one way trips so only good for taking out the garbage. Soyuz is full of people.
They set Dragon free with the arm, Dragon departs, does a de-orbit burn, jettisons the trunk (with the solar arrays), re-enters the atmosphere and parachutes down into the ocean and is recovered.
Although the Dragon is reusable, SpaceX's contract with NASA stipulates that new capsules be used for each resupply mission. Not sure if the contract allows SpaceX to refurbish the capsules for other commercial missions, but the other CRS Dragons are being used for showpieces at the moment.
Interesting - I didn't know that. Do you know if this is due to NASA being general cautions with a new, relatively unproved vehicle? Or is it a condition of human-rating the Dragon?
NASA was unwilling to believe any discount offered for use of a refurbished spacecraft until they'd actually done it, so the bid was made on the basis of a new capsule for each mission.
(The human-rated Dragon is going to be a different version anyway, with altered docking support, much beefier propulsion, altered solar panels, and of course, internal controls and life support. Current plan is new spacecraft permission there, too, though, perhaps for the same reason.)
They set Dragon free with the arm, Dragon departs, does a de-orbit burn, jettisons the trunk (with the solar arrays), re-enters the atmosphere and parachutes down into the ocean and is recovered.