How do the swirls and veins in marble form in detail?
What you see in marble are not veins (for example in the picture of yours). By the term vein in geology we mean a magmatic intrusion in the rock in the form of vein. Can a marble have magma real veins? Yes. The process is explained here: https://en.wikipedia.org/wiki/Intrusive_rock
The 'veins' you are referring to are coming from the different beds of the rock formation. Beds form by the deposition of layers of sediment on top of each other and they might have variations in mineral composition.
As BillOer mentioned already, marble is a metamorphic rock formed from limestone. Can I have different type of 'veins' and swirls in the metamorphosed limestone in comparison with the initial limestone? YES. Why? Because during the metamorphic phase, pressure and heat is applied to the rock. So, we might have a partial melt and re - crystallization, a pressure slide forming swirls and new 'veins'.