The cupule holds and protects the fruit during its growth and maturation. In some genera (e.g. Lithocarpus, Quercus), it only partly encloses the single nut, while in others (e.g. Castanea, Fagus), it fully encloses the two or more nuts, and splits open at maturity into four valves to release the nuts. It is derived from the vegetative part of the flower (its attachment to the rest of the plant). It is covered by numerous scales. In some (e.g. Castanea), the scales are developed into sharp spines, giving the nut protection from squirrels and other seed predators, while in others (e.g. most Quercus), they are not. In Lithocarpus, the cupule is very hard and bone-like in texture.
The calybium is the fruit proper. It develops from an inferior ovary, meaning it is initially encased in the future cupule. Technically the calybium is a nut, as its ovary wall becomes dry with the embryo loosely enclosed inside, and remains closed until germination. In the related family Betulaceae, notably in the genera Carpinus and Corylus, the cupule is replaced by an involucre, which differs in being more leafy in appearance, but performs a similar role in protecting the developing nuts.
References
Gee, Carole T.; Sander, P. Martin & Petzelberger, Bianka E.M. (2003): A Miocene rodent nut cache in coastal dunes of the Lower Rhine Embayment, Germany. Palaeontology46(6): 1133-1149. doi:10.1046/j.0031-0239.2003.00337.x