To prevent injury while exercising, it is important to warm up properly, use proper form and technique, gradually increase intensity, and listen to your body to avoid overtraining.