A comet is a randomly created celestial body usually in orbit around Kerbol, although sometimes they can be found simply passing through the Kerbol System. They first appeared in the game with the release of the Shared Horizons update, or 1.10.
Comets can be found and monitored via the tracking station.
Like asteroids, comets are fully under control of the physics system. They can be rotated or accelerated by the application of torque or thrust, and moved into a different orbit or another body's sphere of influence with correct maneuvering. They do not have SOIs of their own or produce gravity to affect nearby objects; they may not be landed on by craft, stood on by kerbals on EVA, or have flags planted on them, but may be docked with through the use of the Advanced Grabbing Unit.
Comets can be much larger that Asteroids with their class being in the range on class H which corresponds to 100's of thousands of tons which makes them difficult to maneuver with ordinary ships. They become even more challenging with their high inclination orbits and highly elliptical orbits mean that you may only get one shot or have to wait for hundreds of years. Fortunately, Kerbals are immortal which means that can survive the ride and as they approach the Kerbol they are in for a hell of a show with two beautiful tails coming off the comet.
Comets were added in version 1.10 of Kerbal Space Program. This update also brought a lot of new features in collaboration with the ESA.
Once a comet is captured with the Advanced Grabbing Unit, it is considered part of the ship. It can be renamed when docked, and/or the craft can then use its engines to alter its orbit. This can be used to get it into a stable orbit around Kerbin or another celestial body, or even drop it into the atmosphere and land it. Capturing a comet requires a procedure similar to docking.
The rendezvous is identical to the usual docking- the comet is targeted and orbits are matched. On close approach instead of targeting a specific docking port the center of mass of the comet may be targeted, and the Advanced Grabbing Unit can attach to the comet's surface at any point. Perfect accuracy is not crucial because the Advanced Grabbing Unit can be tilted after contact to align the craft's thrust with center of mass.