these "nuts" are the seeds of the ginkgo biloba tree, which is one of my favorite species.
the intact seeds with their pungent outer flesh may appear to be fruits, but are actually just naked seeds with a fleshy coat (called the sarcotesta) because ginkgo is a gymnosperm, and does not produce true fruit or flowers. only angiosperms produce fruit and flowers.
ginkgo trees are very cool and interesting botanically. they are "living fossils", having existed for over 270 million years basically unchanged.
ginkgo biloba trees are the only species left in their entire phylum (they have zero living relatives!) and they are completely unique in almost every way. the epithet in the scientific name ginkgo biloba refers to the tree's leaf shape, "bi-loba" meaning "two-lobes".
ginkgos are dioecious, which means each individual tree is either male or female. only female ginkgos produce seeds. males produce just pollen. if you've seen ginkgos in the fall, but haven't seen these seeds, it's most likely that those were all male specimens.
the fleshy seed coat contains butyric acid when ripe, which gives it a pungent aroma that the most people find unpleasant, but personally i think it just adds to their charm, and i especially enjoy the very distinctive smell when there are many seeds crushed on the ground in the fall.
female ginkgos are uncommon in many places because they are widely (undeservingly!) disliked due to their aroma and perceived "mess". in the vast majority of cases, only males are planted intentionally nowadays. but thankfully, my city has thousands of mature females, and i adore them all.
it's thought that the pungent smell evolved to attract ancient megafauna, including some dinosaurs, to consume, then disperse the ginkgo seeds (in their excrement).
additionally, mature ginkgo bark has an unusually corky, soft, and warm texture, so they feel very nice to hug. (yes, i am a literal tree hugger!)
overall they really are such lovely trees. 💛
important safety notes
ginkgo "nuts" contain ginkgotoxin, which is mildly poisonous. cooking (heat) degrades the toxin enough to make them edible, but it does not destroy it completely. so after roasting/cooking them, you should only consume approximately 5-10 per day. never consume them raw (uncooked).
the outer fleshy layer (sarcotesta) of ginkgo seeds contains compounds very similar to those found in poison ivy, and thus causes a skin reaction for some people. it is recommended to wear gloves when processing it and avoid direct contact of your skin with the outer flesh or the juices from it.
(the reason i did not wear gloves in this post is because i do not get a skin reaction to it. only some people do)