How can I prevent long term injuries in martial arts?

Conditioning. Make sure that you stretch and warm-up properly to maintain good flexibility. Make sure that you learn and maintain good technique because you want to maintain efficiency in your motion. Understand that martial arts when practiced is more than a sport or form of exercise but a way of life.
Strength/Flexibility. Maintain good strength throughout your body, and stretch out to maximize your flexibility. Those are the best things that you can do.