Some orders may be cancelled before their action is complete. You hit the red "X".
Sending troops Edit
Hit the red X in your rally point listing within 90 seconds of sending, and the troops will simply turn around and come back, looking as if they are returning from the target.
Building and extending Edit
Hit the red X on your overview or village center screen at any time before completion, and your resource area or building will revert to how it was when you gave the order.
If it is a new (or restarted) building or a "0 to 1" resource upgrade, you get all your resources back.
If it is already at or above level 1, you get back only the resources that you used to get it to its current level.
Try not to waste even more by letting resources spill!