What tells a robot what to do?

Robot software is the coded commands that tell a mechanical device (known as a robot) what tasks to perform and control its actions.