Veins have valves in them to prevent blood from flowing in the wrong direction. Arteries do not have these valves because arteries contain blood under high pressure, which causes the blood to flow in only one direction. If you didn’t have valves in your veins, blood would flow backwards as well as forwards due to gravity. It would be considerably harder for blood to return to the heart without valves in your veins. Sometimes the valves in your veins become weaker than normal. When this happens the blood in your veins begin to flow backwards and pool in your veins. This causes your veins to become enlarged and twisted. Additionally, in order to accommodate the pooling blood, your body will begin creating new veins called spider veins to, essentially, create more space for the pooling blood.
Edit: I forgot to answer the last part of your question. If you want to reduce your chances of developing varicose veins you should not sit directly on your legs or in the crisscross position. You could sleep with your legs elevated and exercise always helps.
Latest Answers