biofuel is a hydrocarbon that is made BY or FROM a living organism that we humans can use to power something. This definition of a biofuel is rather formal. In practical consideration, any hydrocarbon fuel that is produced from organic matter (living or once living material) in a short period of time (days, weeks, or even months) is considered a biofuel. This contrasts with fossil fuels, which take millions of years to form and with other types of fuel which are not based on hydrocarbons (nuclear fission, for instance).
What makes biofuels tricky to understand is that they need not be made by a living organism, though they can be. Biofuels can also be made through chemical reactions, carried out in a laboratory or industrial setting, that use organic matter (called biomass) to make fuel. The only real requirements for a biofuel are that the starting material must be CO2 that was fixed (turned into another molecule) by a living organism and the final fuel product must be produced quickly and not over millions of years.