Complex sentence: A comet is an icy small Solar System body that, when passing close to the Sun, heats up and begins to outgas, producing a visible atmosphere or coma, and sometimes also a tail.
Split into simpler sentences: A comet is an icy small Solar System body that, when passing close to the Sun, heats and begins to evolve gasses called outgassing. This produces a visible atmosphere or coma, and sometimes also a tail.