We use the Herschel-ATLAS survey to conduct the first large-scale statistical study of the submillimetre properties of optically selected galaxies. Using ∼80 000 r-band selected galaxies from 126 deg2 of the GAMA survey, we stack into submillimetre imaging at 250, 350 and 500 μ m to gain unprecedented statistics on the dust emission from galaxies at z < 0.35. We find that low-redshift galaxies account for 5 per cent of the cosmic 250-μm background (4 per cent at 350 μ m; 3 per cent at 500 μ m), of which approximately 60 per cent comes from ‘blue’ and 20 per cent from ‘red’ galaxies (rest-frame g−r). We compare the dust properties of different galaxy populations by dividing the sample into bins of optical luminosity, stellar mass, colour and redshift. In blue galaxies we find that dust temperature and luminosity correlate strongly with stellar mass at a fixed redshift, but red galaxies do not follow these correlations and overall have lower luminosities and temperatures. We make reasonable assumptions to account for the contaminating flux from lensing by red-sequence galaxies and conclude that galaxies with different optical colours have fundamentally different dust emission properties. Results indicate that while blue galaxies are more luminous than red galaxies due to higher temperatures, the dust masses of the two samples are relatively similar. Dust mass is shown to correlate with stellar mass, although the dust-to-stellar mass ratio is much higher for low stellar mass galaxies, consistent with the lowest mass galaxies having the highest specific star formation rates. We stack the 250 μ m-to-NUV luminosity ratio, finding results consistent with greater obscuration of star formation at lower stellar mass and higher redshift. Submillimetre luminosities and dust masses of all galaxies are shown to evolve strongly with redshift, indicating a fall in the amount of obscured star formation in ordinary galaxies over the last four billion years.