This is a drawing of how a comet behaves as it passes by the sun.
JPL