Idiopathic pulmonary fibrosis (IPF) is a specific form of chronic, progressive fibrosing interstitial pneumonia of unknown causes. Current diagnostic criteria are based on radiological, clinical, and histopathological features but, unfortunately, still many patients remain undiagnosed. Two currently approved therapies, pirfenidone and nintedanib, slow down disease progression but failed to block or revert it. On the other hand, many of the therapeutic agents tested in several clinical trials have not given satisfactory answers, probably due to the pathological heterogeneity of the disease. A growing number of studies show that IPF phenotype is the common clinical outcome of a variety of different pathophysiological mechanisms that identify disease subgroups characterised by specific genetic and molecular biomarkers (endotypes). The precision medicine approach is identifying and analysing the complex system of genetic, molecular, environmental, and behavioural variables underlying the development of the disease and the response to therapy. These molecular pathways are potential targets for novel agents and useful diagnostic, prognostic, and theragnostic biomarkers. We outline the status of knowledge in this field by discussing the complex pathogenetic pathways underlying different disease subgroups and assessing a stratification approach to novel therapeutic agents based on these endotypes.