A washing machine is an example of a machine because it is designed to perform a specific task and works on predefined instructions. In contrast, a robot can sense its surroundings, take decisions, and perform different tasks using sensors, actuators, and a controller.