Endophytes are any microbes that can live within plants. We divide them into three major functional groups: endosyms (endosymbionts), endopaths (pathogens) and endosympaths (those that exist in both forms along a mutualism–parasitism continuum). Within these groups, endophytologists recognise harmful pathogenic microbes and a diverse range of beneficial/commensal microbes, including bacteria and archaea, such as diazotrophs, and fungi, such as the vertically transmitted clavicipitaceous endophytes, the generally horizontally transmitted class 2 fungal endophytes, mycorrhizal fungi and dark septate endophytes. This chapter introduces the science of endophyte biology and its application for a world population that is projected to grow to over 9 billion by 2050. It explores the potential of endophytes for improved agricultural and silvicultural sustainability including: yield improvement and nutrition; biocontrol of pests and diseases; and abiotic stress resistance in the context of climate change. It outlines how bioprospectors are using endophytes as sources of novel metabolites for the pharmaceutical and biochemical industries, and describes how endophytes can be used in vitro to elicit the increased production of known secondary metabolites from plants.