The story of the comet star is told by Matthew in the second chapter of his Gospel (2:2-12). Actually Matthew speaks of a star in its rising (τὸν ἀστέρα ἐν τῇ ἀνατολῇ, ton astera en tè anatolè). The tradition of the comet star is due to Giotto, who, having been impressed by a vision of Halley's comet, reproduced it in the Scrovegni Chapel in Padua in the early 1300s.
From then on the star became a comet. Instead, the great astronomer Kepler hypothesized that it was the conjunction of Jupiter and Saturn aligned with the sun, which he had personal experience of, and calculated that such a phenomenon had also occurred around 6-7 b.e.v. (i.e. B.C.), since such a triple conjunction occurs every 794 years. The Jupiter-Saturn conjunction was known from ancient times, particularly in Babylon, a land of astronomers and astrologers, as the Magi probably were.
In any case whether it was a fixed star or a comet, it is entirely unlikely that it played any role at the birth of Jesus: for Bethlehem is only 7-8 km. from Jerusalem, a distance too small to be intercepted by a celestial phenomenon. Halley's comet in fact passes at a distance of 63 million kilometers from Earth; Jupiter (which is closer to Earth than Saturn) stands at a distance ranging from 588 to 968 million kilometers. A supernova (i.e., an exploding star, which Newton had a direct vision of: it was SN 1054) can only stand at a measurable distance in no less than hundreds or thousands of light-years from Earth (obviously excluding the sun, which in 5-6 billion years will become a planetary nebula and then a white dwarf).