We define a financial bubble as a period of unsustainable growth, when the price of an asset increases ever more quickly, in a series of accelerating phases of corrections and rebounds. More technically, during a bubble phase, the price follows a faster-than-exponential power law growth process, often accompanied by log-periodic oscillations. This dynamic ends abruptly in a change of regime that may be a crash or a substantial correction. Because they leave such specific traces, bubbles may be recognised in advance, that is, before they burst. In this paper, we will explain the mechanism behind financial bubbles in an intuitive way. We will show how the log-periodic power law emerges spontaneously from the complex system that financial markets are, as a consequence of feedback mechanisms, hierarchical structure and specific trading dynamics and investment styles. We argue that the risk of a major correction, or even a crash, becomes substantial when a bubble develops towards maturity, and that it is therefore very important to find evidence of bubbles and to follow their development from as early a stage as possible. The tools that are explained in this paper actually serve that purpose. They are at the core of the Financial Crisis Observatory at the ETH Zurich, where tens of thousands of assets are monitored on a daily basis. This allow us to have a continuous overview of emerging bubbles in the global financial markets. The companion report available as part of the Notenstein white paper series (2014) with the title ``Financial bubbles: mechanism, diagnostic and state of the World (Feb. 2014) presents a practical application of the methodology outlines in this article and describes our view of the status concerning positive and negative bubbles in the financial markets, as of the end of January 2014.