(covers information from several alternate timelines)
An apple (Malus domestica) was an edible fruit with a sweet taste; red, green, or even yellow in color. Besides the domestic apple native to Earth, different varieties of apples have been known to be cultivated in otherworldly forms. The apple was used as a symbol of education and knowledge.
Sir Isaac Newton made his theory of gravity after the Q known as Quinn accidentally knocked an apple on his head. (VOY: "Death Wish") In later centuries, many intellectuals considered the "apple story" of Newton's discovery to be apocryphal. (TNG: "Descent")
In the late 20th century, an apple was incorporated into the design of the mission insignia for the Space shuttle mission STS-51L. The apple followed the name of the first teacher in space, Christa McAuliffe. (ENT: "First Flight")
In 2364, Groppler Zorn offered Commander William T. Riker some fruits when he visited Zorn in his office in Old Bandi City. Riker wanted an apple, but there were none available. The Farpoint Station entity then created a bowl of apples, as it was instructed to satisfy the desires of the Starfleet crew. This led Riker to suspect the Bandi were not being completely honest about the origins of Farpoint. (TNG: "Encounter at Farpoint")
In 2371, Joe Carey found a fruit that resembled an apple while on an away team scouting a planet for food. However, Neelix informed Carey that it was a poisonous kaylo fruit and suggested they spend their time gathering leola root instead. (VOY: "State of Flux")