The words forbidden fruit stand as a metaphor (an image). The metaphor comes from the book of Genesis in the Bible. There Adam and Eve are thrown out of Paradise because they eat from the tree of knowledge.[1]
The fruit has commonly been represented as an apple due to wordplay of the Latin word for apple, malus, which can mean both "evil" and "apple". The Bible does not specify a fruit, but locates it as being at the very center of The Garden of Eden. In Judaism the fruit is believed to be either a grape, a fig, a citron or wheat. Most scholars say that the type of fruit is not forbidden, it was just the fruits of that particular tree that were.
In general, the term can also refer to something illegal or immoral to do. It might also be dangerous. Many times this is about sex outside of marriage.