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.
The amount of matter in an object ismass....anything that occupies spaca and has weight is called matter.....