Context. Low-metallicity star-forming dwarf galaxies are prime targets to understand the chemical enrichment of the interstellar medium. The H region contains the bulk of the mass in blue compact dwarfs, and it provides important constraints on the dispersal and mixing of heavy elements released by successive star-formation episodes. The metallicity of the H region is also a critical parameter to investigate the future star-formation history, as metals provide most of the gas cooling that will facilitate and sustain star formation. Aims. Our primary objective is to study the enrichment of the H region and the interplay between star-formation history and metallicity evolution. Our secondary objective is to constrain the spatial-and time-scales over which the H and H regions are enriched, and the mass range of stars responsible for the heavy element production. Finally, we aim to examine the gas heating and cooling mechanisms in the H region. Methods. We observed the most metal-poor star-forming galaxy in the Local Universe, I Zw 18, with the Cosmic Origin Spectrograph onboard Hubble. The abundances in the neutral gas are derived from far-ultraviolet absorption-lines (H , C , C *, N , O , ...) and are compared to the abundances in the H region. Models are constructed to calculate the ionization structure and the thermal processes. We investigate the gas cooling in the H region through physical diagnostics drawn from the fine-structure level of C + . Results. We find that H region abundances are lower by a factor of ∼2 as compared to the H region. There is no differential depletion on dust between the H and H region. Using sulfur as a metallicity tracer, we calculate a metallicity of 1/46 Z (vs. 1/31 Z in the H region). From the study of the C/O, [O/Fe], and N/O abundance ratios, we propose that C, N, O, and Fe are mainly produced in massive stars. We argue that the H envelope may contain pockets of pristine gas with a metallicity essentially null. Finally, we derive the physical conditions in the H region by investigating the C * absorption line. The cooling rate derived from C * is consistent with collisions with H 0 atoms in the diffuse neutral gas. We calculate the star-formation rate from the C * cooling rate assuming that photoelectric effect on dust is the dominant gas heating mechanism. Our determination is in good agreement with the values in the literature if we assume a low dust-to-gas ratio (∼2000 times lower than the Milky Way value).