How can I prevent myself from getting sciatica?

You may not. You may not be able to prevent from developing sciatica. Just as any other condition, stay healthy and see your primary care doctor about maintaining a healthy back.
Core Exercises. Typically core strengthening exercises are the best to help relieve pressure and forces in the spine. I would try and google some or look them up on youtube to see descriptions. If you can do them yourself, wonderful otherwise ask your doctor to get a referral to a good physical therapist for further assistance.
Skirting Sciatica. Sciatica is not preventable because it is the result of an acute injury or predisposition to anatomical change that occurs over time. Sciatica is a compression or encroachment of the sciatica nerve or its roots that causes pain. Remaining physically fit, watching your body weight as you age, and avoiding hazardous activities are somewhat "preventive" but not a guarantee in the real sense.