The term biomass was used in the past in the field of ecology to describe the total mass of living organisms in an ecosystem, or the whole of Earth in general. As far as energy sources are concerned, biomass refers to biological material, derived from living organisms --- plants and animals alike --- or from organisms that have recently died. Biomass is composed of substances such as nitrogen, oxygen, hydrogen, alkali and heavy metals. The fact that biomass can be found in every living or recently living organism, means that this energy source can last throughout the foreseeable future, if managed on a sustainable basis.
Biofuel, also referred to as agrofuel, is a sustainable energy source derived from biomass or bio-waste. It includes a wide range of fuels that can replace petroleum derivatives in the transportation sector, or for heating purposes. Ethanol fuel and biodiesel are the most commonly used biofuels in the world. Even though biofuel is a guaranteed renewable source of energy, its use is still limited, as scientists have yet to come up with a reliable method to convert biomass energy into liquid fuel.
The main difference between biomass and biofuel is the fact that the latter is produced by the former. It is similar to the difference between potatoes and potato chips, for example. Biomass can be used both directly, by burning wood for cooking or house heating, for example, and indirectly, producing renewable liquid fuel. Biofuel, on the other hand, cannot be found unprocessed in nature; specially processed biomass is needed to create it.
Biomass has been used for thousands of years through such common practices as the example of burning wood. With modern processing methods, biomass can also be used to produce electricity, and bio-products such as plastic and chemicals. Its derivative, biofuel, is used to accommodate the "ancient" needs in a modern way, by providing gas for the heating system of a house and for the cooking appliances. In addition, biofuel is used in transportation, mainly in the United States, Brazil, and the European Union as an alternative to oil, with the prospects of gradually replacing oil.