How to update unit availability status

How to Activate or Deactivate a Unit?