Biodegradable refers to any material that can be broken down by natural processes into its component parts, typically by microorganisms. This process may take a long time, especially in the absence of the right conditions (e.g. heat, moisture, oxygen).
Compostable, on the other hand, refers to materials that can break down within a specific timeframe (usually several months) under controlled composting conditions, into a material that is safe and nutrient-rich for plants. In other words, compostable materials are a type of biodegradable material that are specifically designed to be broken down in composting facilities and used as fertilizer for plants.
So, the main difference is that biodegradable materials can break down over time into their component parts, while compostable materials are designed to break down in a controlled composting environment into a useful fertilizer.