You're fishing for "comet", but the setup of your riddle is defective.
-- A comet need not necessarily be in orbit around the sun.
Its appearance may be a once-in-eternity event.
-- A comet only has a 'tail' during the small portion of its orbit
when it's relatively near the sun.
-- The whole notion of a "tail" is misleading. That particular whatchamacallit
always points away from the sun, so when the comet has rounded the sun
and is headed out again, the so-called 'tail' goes in
front of it.