We present a plane-wave implementation of the GW approximation within the projector augmented wave method code GPAW. The computed band gaps of ten bulk semiconductors and insulators deviate on average by 0.2eV (~5%) from the experimental values, the only exception being ZnO where the calculated band gap is around 1eV too low. Similar relative deviations are found for the ionization potentials of a test set of 32 small molecules. The importance of substrate screening for a correct description of quasiparticle energies and Fermi velocities in supported two-dimensional (2D) materials is illustrated by the case of graphene/h-BN interfaces. Due to the long-range Coulomb interaction between periodically repeated images, the use of a truncated interaction is found to be essential for obtaining converged results for 2D materials. For all systems studied, a plasmon-pole approximation is found to reproduce the full frequency results to within 0.2eV with a significant gain in computational speed. Throughout, we compare the GW results with different exact exchange-based approximations. For completeness, we provide a mathematically rigorous and physically transparent introduction to the notion of quasiparticle states.