A comet's structure includes the rock-ice nucleus, its atmosphere (coma), and the tails that stream out behind the comet as it approaches the Sun.
As a comet approaches the Sun its ices begin to sublimate. The gas escaping from the nucleus carries dust with it, creating the coma. As the solar wind streams around the coma it carries cometary particles and dust with it, leading to the formation of the comet's tails.
The ion tail contains ionised gas and dust and always streams directly away from the Sun. The dust tail, laced with microscopic dust particles, curves slightly in the direction of the comet's orbit.