However, it cannot move on it's own. If you leave a unit unattended too long, it may run out of something. All mainbases and minibases are a source of these resources. A suppily truck will refuel nearby units from it's own suppily. However, it must be near enough to one of your bases to resuppily itself.
Programs costs different amounts of money.
In general defensive programs are cheaper, and programs which require less movement are cheaper. This means that the unit should not move, ever. It should just stay where you put it and shoot at enemy units. This is the cheapest program. It is also the only program you can assign to the 'Turret' unit.