Q: How does unit combat work if one unit chooses to attack while the other moves? Is it possible to command a unit to attack in a spot you predict an enemy unit will move to?
A: Most of the attacks work by telling a unit to attack another unit not an actual location. This acts like an order to continue attacking that unit even when it is moving around. So, if the moves, the attacker will continue attacking it and damage will get done when it is in the range of the attacker.
Some units like the Maxwell have attacks that really are attacking a particular square, not a unit.