By code abstraction.
You would have a command (calls a function) that does a high level or abstracted task. But to do so all the individual tasks will need code such as 'left arm down 10cm' etc.
Its kinda like when you click on the 'post a new thread' button on this web site. That one mouse click does a lot but there is lots of code at different level being executed.