These "Dirty Snowballs"
as Fred Hoyle, the famous British Astronomer & SciFi writer,
once called them, are thought to be
remnants from the time the Solar System was formed.
These balls of
rock, dust & water ice may have very enlongated orbits or shorter orbits
which cause them to swing by the Sun every X time. As they do so their nucleus heats up & water ice sublimates
into vapour which causes dust to fly off at great speed, (the "Tail" we see
pointing away from the Sun pushed back by the solar
wind)