Capgemini Engineering Interview Question

What is a state machine?