Sometimes (and not too rarely), when you select a group of your fighters, then right-click on an enemy unit to attack it, your units will not attack it but just move towards this enemy unit and stand there. This especially happens when CPU load is high and/or FPS is low. It happens more often (but not only) in large games with many network players from all over the world (and both network and other lag which are both caused by this setup). It may be less of a problem on faster GPUs.
I assume this happens when you click during a tick in which the game is not expecting you to give an attack order.