When you’re under attack, there are 2 ways to protect yourself:
1) Activate the Protection Shield. Your marching troops cannot be protected.
2) Request Reinforce from your Alliance Members if you’ve joined an Alliance.
Note: Sending troops from under a Protection Shield will disable it and prevent further Shield activations for 30 minutes!