We studied the global characteristics of dust emission in a large sample of emission-line star-forming galaxies. The sample consists of two subsamples. One subsample (SDSS sample) includes ∼4000 compact star-forming galaxies from the Sloan Digital Sky Survey (SDSS), which were also detected in all four bands at 3.4 μm, 4.6 μm, 12 μm, and 22 μm of the WISE all-sky survey. The second subsample (Herschel sample) is a sample of 28 compact star-forming galaxies observed with Herschel in the FIR range. Data of the Herschel sample were supplemented by the photometric data from the Spitzer observations, GALaxy Evolution Explorer (GALEX) survey, SDSS, Wide-Field Infrared Survey Explorer (WISE), Two Micron All Sky Survey (2MASS), NRAO VLA Sky Survey (NVSS), and Faint Images of the Radio Sky at Twenty-cm (FIRST) survey, as well as optical and Spitzer spectra and data in submm and radio ranges. It is found that warm dust luminosities of galaxies from the SDSS sample and cold and warm dust luminosities of galaxies from the Herschel sample are strongly correlated with Hβ luminosities, which implies that one of the main sources of dust heating in star-forming galaxies is ionising UV radiation of young stars. Likely, a significant fraction of dust is located inside H ii and surrounding regions. We found tight correlations between masses of cold and warm dust, again implying the same source of dust heating. Using the relation between warm and cold dust masses for estimating the total dust mass in star-forming galaxies with an accuracy better than ∼0.5 dex is proposed. On the other hand, it is shown for both samples that dust temperatures do not depend on the metallicities. The dust-to-neutral gas mass ratio strongly declines with decreasing metallicity, similar to that found in other studies of local emission-line galaxies, high-redshift gamma-ray burst hosts, and damped Ly-α absorbers. On the other hand, the dust-to-ionised gas mass ratio is about one hundred times as high implying that most of dust is located in the neutral gas. It is found that thermal free-free emission of ionised gas in compact star-forming galaxies is important in the submm and mm ranges, and it might be responsible for the submm emission excess. This effect is stronger in galaxies with lower metallicities and is also positively affected by an increased star-formation rate.