The Tree of Knowledge of Good and Evil was in the Garden of Eden. This was the only tree God forbade Adam and Eve to eat. Genesis 2:17, "And the LORD God commanded the man, saying, 'Of every tree of the garden you may freely eat; but of the tree of the knowledge of good and evil you shall not eat, for in the day that you eat of it you shall surely die.'” So, eating the fruit would mean literally eating fruit. Some people attempt to attach a symbolic meaning to eating the fruit: usually interpreted as the act of sexual union. However, this would be a mistake.
Consider Genesis 1:27-31, "So God created man in His own image; in the image of God He created him; male and female He created them. Then God blessed them, and God said to them, “Be fruitful and multiply; fill the earth…Then God saw everything that He had made, and indeed it was very good. So the evening and the morning were the sixth day." God instructed Adam and Eve to fill the earth with children through natural means and proclaimed "it was very good." Therefore, the act of sex between a husband and wife is not a sin. It is blessed of God to enjoy and to fill the earth.
The whole test was about obedience – even in something as little as eating fruit. God's creations, both angelic and human, were not made robotic, but were given brains to think and reason with and make their own decisions. One of God's angels, Lucifer, fell from heaven due to his prideful ambitions. “For you have said in your heart, I will ascend into heaven, I will exalt my throne above the stars of God…..I will be like the most High…nevertheless you will be thrust down to sheol…” Isaiah 14:12-15
God would have been very happy to see Adam, Eve and their posterity live eternally in the beautiful Garden of Eden, but that had to be their decision. His command in Genesis 2 gave Adam a choice and very explicitly stated the penalty for disobedience. Sadly, Adam chose to disobey God.
Obedience is so important to God that Jesus, Himself, was perfected through His obedient suffering. Hebrews 5:8,9, “though He was a Son, yet He learned obedience by the things which He suffered. And having been perfected, He became the author of eternal salvation to all who obey Him”.
Remember: “But an hour is coming, and now is, when the true worshipers will worship the Father in spirit and truth; for such people the Father seeks to be His worshipers.” John 4:23. Only those who want to obey God by loving Him with all of their hearts, minds, and beings will find eternal life.