I've seen a fair few online summaries of folks' rights when detained by police in the United States. In short: say nothing except that you wish to speak only to an attorney. And, ask whether you are free to leave or whether you are being detained. If they're just asking questions hoping you'll trip up but you're not under detention, it's worth knowing that you're actually free to go.
James at L'Esprit de l'escalier begs for similar summary advice for New Zealand. I don't know if such a source exists. The best I've been able to find is now almost ten years out of date. Anybody know whether the link here still applies or whether a better source now exists?
Update: Gonzo recommends this summary and apparently is having problems with the comments form. I hope this isn't a common problem.