The green line shows where your arrows will hit. Kill all enemies on your march to the castle without losing all of your elves or flag guards.
For each enemy killed, you'll get money, which can be spent in the castle on upgrades. When done purchasing upgrades, click Map to return to the map, where you can go on to the next level.