No one knows for sure, but it was used in the 1300s, 1400s and 1500s in eastern Europe by the Jewish communities. So it wasn't the Nazis who created it.
Some think it came from a ring which is thought to be Solomon's. Rings were designed to create a stamp in wax to seal a document.
Some think it came from a shield support design developed in the first few centuries A.D. This new design of interlocking triangles was much stronger. The Bible does say in Psalms that God is David's shield.
Symbolically, six stands for mankind. If you count the "sides", which are 12, they could stand for the 12 tribes of Israel. Some say it points to all directions of which God rules. North, South, East, West, Up and Down, six directions all needed to create our 3 dimensional world.
Also it could be said that in the first few centuries A.D., Christianity sprung up and had the symbol of the cross, and the Jews wanted a symbol, too, and if they were influenced by Christians, they may have chosen the star because of the star of Bethlehem, David's hometown, honoring both religions of the Almighty God. This last part is my guess.