You can get a grace period of up to 60 days to find another job or change visa status after you terminate your current job. However, if your I-94 or petition end date is before 60 days from your job loss or lay off, then your grace period is shortened until the expiration of your I-94 date.
If you have any legal questions, please feel free to call 800-685-nyis (6947).