What i know about this is that.
The small rocky core of a comet is covered with an icy layer mixed with dust.Generally a comet only becomes visible when it approaches the Sun and begins to melt. The frozen ice and dirt burn into a cloud of gas and dust which surrounds the nucleus.
good luck hope this help