The robots are simple machines, that will always move the shortest possible route to get to you. They are destroyed when they walk into each other, or into scrap piles from previously destroyed robots.
When you have successfully destroyed all of them, you will move along to the next level.