The Star of David is a six sided figure that is used to depict Judaism. It is used both on flags and on pendants. It is based on the hexagram, which was invented by, ironically, the Babylonians, an ancient enemy of the Jewish people. It's meaning stems from the Hebrew writing of David, דוד, makes up a hexagram when the letters are put together. It has been in use since at least the 600s, although some believe that King David also carried it on his shield during wars.
The Magen David - the Shield (sometimes translated "star" of) David - had been used prior to the medieval period. And example is in the stone work on display at the site of the town of Capernaum by the Sea of Galilee. The stone work cleary features the traditional "star of David" and may have been part of the nearby synagogue. The synagogue is the limestone Byzantine period synagogue erected on the floor plan of the original 1st century synagogue made of basalt. The basalt foundations under the later limestone structure (larely standing) is still visible. It is not clear from the stone work what its significance as a symbol is. The worker and his sons are the Zabdai - which is the Aramaic for the Zebedee (John Yohannan) and James (Yaacov) of the Gospels.