I would really hate anyone to be poisoned by confusing chestnuts beause of my photo! In the UK, the above are called Horse Chestnuts, I don't know what they are called in the US and Canada, but they are poisonous!
The Sweet Chestnut is what you can eat. The spikes go brown when the nut is mature, and then you can go a-roasting!
The cases are very different, there being lots of spikes, like a hedgehog, and prickly!
Both these photos were taken from web sites, and are probably copyright.