There are a lot of misconceptions about compost... Compost is the final product of decayed organic matter that can be used as plant fertilizer. What we often call "compost" is actually food scraps, yard waste or other compostables (able to be composted). There are many different methods for composting and different scales at which materials can be composted. If you were to compost in your backyard with a tumbler, bin or worm system you would likely include only plant-based food scraps and possibly animal products depending on how sophisticated your compost system is.
​
When you buy food in a plant-based container that says "compostable" make sure to read the fine print, "in a commercial compost facility."
Just because something is compostable or biodegradable does not mean that it will be composted or biodegrade. When waste decomposes in a landfill it releases methane and carbon dioxide. That is why landfills are often sealed and capped so that no oxygen can get in to begin the decomposition process. That means your "biodegradable" banana peel might remain in landfill forever.