For those 2nd/3rd H1B attempted, how do you maintain your legal status while you were waiting for the next attempt?

If I were not picked this year, how can I continue working in US this year. I’m planning to apply again next year. My opt will expire late May 2018. I enrolled to a new AD program but how can I continue working if my opt is expired? Can I get CPT in the first year of my new degree? What is L visa? Any option?