<img src="http://www.fileden.com/files/2008/3/4/1796632/grid.PNG">
Okay here's a pretty basic explanation based on a 64x64 grid:
1. You select the unit (which has a green border or indicator that he can move) 
2. Four Arrow detectors are created at it's sides:
   Up: Unit.Y - 64
   Left: Unit.X - 64
   Right: Unit.X + 64
   Down: Unit.Y + 64
3. IF the arrow overlaps harsh terrain (rock/lava/water, ect) set the arrow to Red (False) + indicate that movement is not allowed.
4. User clicks on a arrow + Arrow is Green (True)
   Up: Set Unit.Y to  Unit.Y - 64
   Left: Set Unit.X Unit.X - 64
   Right: Set Unit.X to Unit.X + 64
   Down: Set Unit.Y to Unit.Y + 64
Is that what you kinda need?