You may at times with to swap the location of two units. To do this, left click on a unit that you have not yet moved or attacked with. Then press and hold Shift on your keyboard and hover your mouse over an adjacent friendly unit that has also not yet moved.
You will notice that your mouse cursor changes to a double headed black arrow. When this is showing, you are ready to swap the position of two units, all you need to do now is to left click on one of them and they will swap places.