hackbike 666 said:
Basically tighten it up and the rivet will come out.
Um, I always hesitate to over mechanical advice for fear of being wrong but...
If you are needing to rejoin a chain, the last thing you want to do is push the rivet right out. I've not done it hundreds of times, but, when I do (and this is from memory without a chain in my hand, so correct me if I'm wrong):
Look at where the chain has snapped, and go back to the next spot the same (IE, look for whether the two plates are inside or outside the ones in front). When you find the matching spot (basically not the very next link, but the one after), apply the chain tool and tighten to push the rivet through. But only part way through. Push it all the way out and it'll never go back, will it? Anyway, once the rivet is through so that it is just holding the inside of the link together, you can wiggle the little broken bit out, and match the new end up to the break. Then you reverse the tool, and push the rivet back. All my chains have been joined this way, and I've never had one break (of course, I'm probably not putting huge amounts of power through them on a regular basis, but they got me up some stiff hills and some heavy loads).
Best thing is to get a decent book that covers it all, with pictures. You can always practice joining bits of left over chain at home, to get into the fell of it.
Edit: of course a chain joined like this is now a touch too short, but with a derailleur you'll get away with it at least until you get home. It occurs to me, I haven't a clue what you do about a hub gear which may not be able to adjust for the length. Probably a Ballantine-esque quick fix with a paperclip to get you home.