You would be al to remain in the United States pending adjudication of your request to change status assuming the request is filed prior to the termination of your H-1B status. You could not begin your studies until the request is approved. There is no grace period. You will begin accruing unlawful presence immediately upon denial of your request to change status. You need to depart the country ASAP under such circumstances. The answer is the same regardless of the nonimmigrant status you currently possess.
Answered on Aug 22nd, 2016 at 2:18 PM