How do I know how much honey to leave for a hive to winter over with?

Is honey extraction only done in the spring after the bees have eaten all they need for the winter?