The Star of Bethlehem behaved like a comet in three particular ways.
The first indication of it being a comet is its unexpected appearance
Comets are actually giant snowballs made of water ice covered with tar. They orbit the Sun in highly elliptical orbits that swing out into the outer Solar System and back around the Sun again. As they approach the Sun, the heat melts the ices and causes a stream of gases to flow out from the comet as a tail streaming behind. Comets may be seen once as they approach the Sun or twice if they are seen on their way back out again.
Halley’s Comet is a short-period comet that returns to pass the Earth regularly every 76 years on average, but there are long-period comets with orbits of over 200 years. Their orbits are very elliptical going out far beyond the planets. Long-period comets approach the Sun from all angles and many have retrograde motion around the Sun.
Thus, comets may suddenly appear. They can be extremely bright with long tails. Their brightness gets more and more intense as they pass by the Earth and approach the Sun turning them into dramatic events.
The second indication of it being a comet is that it moved across the sky
Over a certain number of days or weeks a comet may move across the sky. Comets that are visible to the naked eye often appear to be low-lying to the Earth compared to the background of stars that do not move.
They may move slowly or rapidly across the sky in various directions as comets approach the Sun from all angles.
Halley’s Comet moves northwards across the sky, visible for a number of days or weeks depending on the position of the Earth in relation to the Sun.
We know that the wise men’s first port of call was Jerusalem and Herod’s palace. Bethlehem is 6 miles south of Jerusalem. The star goes ahead of the wise men on their way to Bethlehem. This means that the star was moving southwards. It is perfectly possible for a comet to be moving southwards, especially if it were a long-period comet.
This implies that the wise men travelled southwards, not northwards from Persia to Judea. If the wise men came from Media in the region below the Black Sea and Caspian Sea, and maybe from a part called Lydia (now Turkey), they would have travelled south to reach Jerusalem and Bethlehem. The Magi were a priestly group that originated in the 6th century BC among the Medes of Media.
Thus, while Halley’s Comet moves towards the north, the comet of 5 BC may well have been moving towards the south.
Colin Humphreys explains that during the 70 days the comet of 5 BC was seen, the constellations would move round by a certain number of degrees so the direction would appear to change. The constellations of stars form a backdrop to a comet moving within the Solar System.
The third indication of it being a comet is that it stopped over Bethlehem
A curious thing about comets, and proof that it was a comet is that comets can be seen to ‘stand over a city’ pointing down to it. When a comet points in this way, its tail is vertical so it looks like an arrow in the sky. Maybe the comet is receding away at this point, as it may then disappear. The Star of Bethlehem stopped over Bethlehem before disappearing.
The Chinese called comets ‘broom stars’ due to their shape and orientation, while ancient texts of the West described them as resembling swords. A sword over a city would be more ominous.
When the Star of Bethlehem stops, the wise men find Mary and the baby. It may be that they made inquiries in Bethlehem or that the star was seen to stop just as they were passing by a particular house, and so they went in. By the time the three wise men reach Bethlehem, Mary, Joseph and baby Jesus are no longer staying in a stable as at least two months have gone by.