Any foreigner overstaying his visa in the Kingdom of Thailand for a longer period will be banned from re-entering the country for a specific time!
If you report yourself to the Immigration authorities the penalty will be less severe:
Overstaying of more than 90 days = 1 year; more than 1 year = 3 years, more than 3 years = 5 years, more than 5 years = 10 years being banned from re-entering,
When arrested and prosecuted penalties are tough:
Overstaying less than 1 year comes with a 5 years and more than 1 year with a 10 years re-entry ban and heavy fines.