If you voluntarily exit, you will be fined 500 baht per day of overstay (maximum amount of 20,000 baht), you will not go to jail.
If you are caught by police overstaying, you will face criminal charges and higher fines. Jail time tends to alloted primarily for really long overstays (as in years), not for minor overstays.
If your overstay is less than 90 days, your passport will be marked as an overstay and any future visits will be subjected to proving your tourist intentions (departing tickets, funding, hotel bookings).
If your overstay is more than 90 days you will be banned from the country for 1 year in situation one (voluntary) or 5 years in situation two (arrested). Overstaying by one year would be 3 and 10 year bans respectively.
http://overstay.immigration.go.th/advice.html
If you can't pay the fine, you will be at the mercy of the immigration officer handling your case. He could simply clean out your wallet and send you packing home, he could press legal charges against you, he could choose to deport you which could have ramifications on future visas or visits anywhere, etc. You really need to secure funds before going to the airport, contact friends family back home, ask your buddies in Thailand, contact your embassy about loans, etc.