Comets orbit the sun just like planets do. Except a comet usually has a very elongated orbit. Thanks to the laws of gravity comets obey the same laws. A comets orbit takes it very close to the sun and then far away again.
For an inelastic collision where coefficient of restitution,e, is equal to 0, the momentum is conserved but not the kinetic energy. So, there is addition or elimination of kinetic energy.
On the otherhand, when e = 1, like for an elastic collision, kinetic energy and momentum is conserved. Thus, the system's kinetic energy is unchanged.