Comets are in elliptical orbits around the sun so literally half the time they're traveling away from the sun.
Sometimes they don’t make it:
https://en.wikipedia.org/wiki/Sungrazing_comet
https://www.space.com/8478-comet-collision-sun-captured-3.ht...
Sometimes they don’t make it:
https://en.wikipedia.org/wiki/Sungrazing_comet
https://www.space.com/8478-comet-collision-sun-captured-3.ht...