solar weather and its effect on Earth facilitates predictions of costly and damaging geomagnetic storms. Within the Earth's immediate environment, LOFAR will map irregularities in the ionosphere continuously, detect the ionizing effects of distant gamma-ray bursts and the flashes predicted to arise from the highest energy cosmic rays, the origins of which are unclear. By exploring a new spectral window LOFAR is likely to make serendipitous discoveries. Detection of new classes of objects or new astrophysical phenomena have resulted from almost all previous facilities that open new regions of the spectrum, or pushed instrumental parameters, such as sensitivity by more than an order of magnitude. Key projects The epoch of reionization One of the most exciting, but technically most challenging, applications of LOFAR will be the search for redshifted 21 cm line emission from the Epoch of Reionization (EoR). It is thought that the 'Dark Ages', the period after recombination when the Universe turned neutral, lasted until around z=20. WMAP polarization results appear to suggest that there may have been extended, or even multiple phases of reionisation, the start possibly being around z~15-20 and ending at z~6. Using LOFAR, the redshift range from z=11.4 (115 MHz) to z=6 (200 MHz) can be probed. The expected signal is small, and disentangling it from the much stronger foreground emission is challenging. Deep extragalactic surveys One of the most important applications of LOFAR will be to carry out large-sky surveys. Such surveys are well suited to the characteristics of LOFAR and have been designated as one of the key projects that have driven LOFAR since its inception. Such deep LOFAR surveys of the accessible sky at several frequencies will provide unique catalogues of radio sources for investigating several fundamental areas of astrophysics, including the formation of massive black holes, galaxies and clusters of galaxies. Because the LOFAR surveys will probe an unexplored parameter of the Universe, it is likely that they will discover new phenomena. In February 2021, astronomers released, for the first time, a very high-resolution image of 25,000 active supermassive black holes, covering four percent of the Northern celestial hemisphere, based on ultra-low radio wavelengths, as detected by LOFAR. Transient radio phenomena and pulsars The combination of low frequencies, omnidirectional antennae, high-speed data transport and computing means that LOFAR will open a new era in the monitoring of the radio sky. It will be possible to make sensitive radio maps of