A coconut was a hard fruit that grew on the coconut palm on the planet Earth. Inside the hard shell of the fruit was a white, sweet, fleshy "meat" which was edible, and a liquid referred to as "coconut milk."
In 2268, coconut was among the ice cream flavors available on tape for reproduction in the food synthesizers aboard the USS Enterprise. (TOS: "And the Children Shall Lead")
In 2366, Geordi La Forge offered Christy Henshaw a drink called a "Coco-no-no", made from the hollowed-out half of a coconut shell, while the two were on a date on the holodeck. (TNG: "Booby Trap")