Context. This study deals with infrared bubbles, the H ii regions they enclose, and triggered massive-star formation on their borders.Aims. We attempt to determine the nature of the bubbles observed by Spitzer in the Galactic plane, mainly to establish if possible their association with massive stars. We take advantage of the very simple morphology of these objects to search for star formation triggered by H ii regions, and to estimate the importance of this mode of star formation.Methods. We consider a sample of 102 bubbles detected by Spitzer-GLIMPSE, and catalogued by Churchwell et al. (2006; hereafter CH06). We use mid-infrared and radio-continuum public data (respectively the Spitzer-GLIMPSE and -MIPSGAL surveys and the MAGPIS and VGPS surveys) to discuss their nature. We use the ATLASGAL survey at 870 μm to search for dense neutral material collected on their borders. The 870 μm data traces the distribution of cold dust, thus of the dense neutral material where stars may form. Results. We find that 86% of the bubbles contain ionized gas detected by means of its radio-continuum emission at 20-cm. Thus, most of the bubbles observed at 8.0 μm enclose H ii regions ionized by O-B2 stars. This finding differs from the earlier CH06 results (∼25% of the bubbles enclosing H ii regions). Ninety-eight percent of the bubbles exhibit 24 μm emission in their central regions. The ionized regions at the center of the 8.0 μm bubbles seem to be devoid of PAHs but contain hot dust. PAH emission at 8.0 μm is observed in the direction of the photodissociation regions surrounding the ionized gas. Among the 65 regions for which the angular resolution of the observations is high enough to resolve the spatial distribution of cold dust at 870 μm, we find that 40% are surrounded by cold dust, and that another 28% contain interacting condensations. The former are good candidates for the collect and collapse process, as they display an accumulation of dense material at their borders. The latter are good candidates for the compression of pre-existing condensations by the ionized gas. Thirteen bubbles exhibit associated ultracompact H ii regions in the direction of dust condensations adjacent to their ionization fronts. Another five show methanol masers in similar condensations. Conclusions. Our results suggest that more than a quarter of the bubbles may have triggered the formation of massive objects.Therefore, star formation triggered by H ii regions may be an important process, especially for massive-star formation.