Do comets contain a lot of ice?

Yes, they are nick-named 'dirty snowballs' and also contain rocks. What you see as the comet's tail is the ice melting because of the sun. When the comet returns to outer space the tail is no longer present. Gradually, the comets reduce in size because of this melting.