There are different schools of thought on how to cook chestnuts. Chestnuts can be boiled but after we cooked them that way once, we concluded that roasting brings out the nutty flavor better. Some directions say to score, boil, and then roast them. And no matter how you score the skin, there are always some stubborn nuts that refuse to release their skin without a fight. Mold can be a problem too, but if you cook them as soon as possible after buying them, you are not as likely to have a bunch of moldy nuts.
Here is one way to roast chestnuts, and if they are fresh, you will have the best chance of peeling without too much difficulty.
Cut chestnuts along the curved side of the nut with a sharp paring or steak knife. If you can cut a large X or cut all the way around, peeling will be even easier. Try not to cut into the nutmeat.
Heat oven to 350°F. Place chestnuts on a roasting pan and bake for 35-40 minutes. Remove from oven and peel immediately using a clean kitchen towel to keep from burning your fingers. They will be more difficult to peel when cooled completely. Enjoy!