What makes a charity a charity?

The Detail - A podcast by RNZ

The Supreme Court has ruled that Family First isn't a charity - so what actually are the rules about what is and isn't a charity?