@Maryam ***
normally people cancel in advance with a letter from the school stating the last day of study, that would be the day you need to leave. If you just turn up to cancel it yourself you should leave that day, they might let you apply for an extension for 1900 baht which they will refuse and give you 7 days to get out of Thailand but they don't have to do that so I wouldn't rely on it