The immigration officer decides. You might just be allowed back into Canada for the length of your original stay, you might be given a new visit (the length of this visit is up to the immigration officer and could be anywhere from a few days to six months), and there's always some possibility you might be refused entry.