I answered a similar question for ethanol, and the answer for this is the same as well.
Biodiesel is a bio-based fuel that is usually derived from vegetable oils such as palm oil, soybean oil, canola oil etc.
Biodiesel is a complete substitute for petro-diesel – the diesel you and I know. Thus it is a bio-based, renewable and sustainable alternative for diesel.
Biofuel is any fuel that is derived from sources of biological origin, typically plants. All variations of biodiesel are thus types of biofuels.
But all biofuel is not biodiesel.
Biofuel is an umbrella term that includes a range of fuels derived from biomass – other than biodiesel, it also includes ethanol, biogas, biocharcoal, and increasingly a range of less-known fuels such as biogasoline, bionatural gas and so on.
Well, you don’t have to be embarrassed if you had mixed up biodiesel and biofuel occasionally in your conversations. I have seen some self-proclaimed renewable energy experts make this mistake while speaking in front of hundreds of people, and blissfully repeat the mistake over and over again in subsequent speeches!