Cosmic Snowballs
Often called “dirty snowballs”, comets are composed of frozen gases, rock and dust roughly the size of a small town. They start in one of two regions, the Kuiper Belt or the Oort Cloud, and get pulled into an orbit closer to the sun by passing gravitational bodies. As these comets orbit the sun, they heat up, melt, and eject dust and gas which forms a tail stretching millions of miles.
(https://go.nasa.gov/39glemA, https://go.nasa.gov/2OG5n7p)