A real-life example of using a loop can be found in a coffee shop where an employee prepares multiple cups of coffee for a group of customers.