Current USCIS regulations allow certain students with pending or approved H-1B petitions to remain in F-1 student status during what is called the Cap-Gap period. USCIS regulations provide a way of filling the "gap" between the end of F-1 status and the beginning of H-1B status that might otherwise occur if F-1 status is not extended for a qualifying student.
For the new Cap Subject H-1B petitions filed during first 5 business days of April 2017 for FY 2018, the lottery results have been disclosed to the successful petitioners over the past 10 days (the petitions not selected in the lottery will be returned soon to the companies that filed them).
Since it will take several weeks for all unselected petitions to be returned, F-1 students who did not get selected may continue to benefit from an automatic cap-gap extension until their rejection notice is received. After receipt of the rejection notice, a student has a 60-day grace period starting from the date of the rejection notice (or their program end date, whichever is later), to prepare for and depart the United States.
Please note that the F-1 students who were on OPT employment (but not in the 60-day grace after OPT) at the time of filing of H-1B cap-subject petition, will continue to be “employment authorized” during the period of Cap Gap extension; but those in the 60-day grace period will not be able to keep their employment (they can only remain in the U.S. for those 60 additional days).