If someone overstays a Visa, and then books a flight back to their home country- what happens?

I am not planning this haha, Its pure curiosity. I am aware it is different for different countries- I’m more thinking of the safer countries like America, or Canada
10 answers 10