Capgemini Engineering interview question

What is a state machine?