The only way a person can work after the six years is if s/he :
1. Changes to a nonimmigrant status that enables the person to work, such as the O-1 or J-1; or
2. Obtains permanent residency based on an approved immigrant petition (where the priority date is current) by attending the immigrant visa interview at the U.S. consulate in the home country or filing papers towards adjusting status to permanent residence in the U.S. and working on the employment authorization document (EAD) issued within approximately 3 months after filing the adjustment of status application; or
3. Departs from the U.S., lives abroad for one year, and then re-enters the U.S. on another H1B visa for three years at a time, for a maximum total of six years again; or
4. Works abroad for one year with a parent, subsidiary or related corporation of an U.S. corporation and re-enters the U.S. on an L-1 status; or
5. Obtains an H1B extension to recapture significant time spent abroad during the six years as H1B; or
6. Obtains an H1B extension under AC21 if (a) the green card was started at least a year prior and the I-140 or I-485 is pending or (b) I-140 is approved and awaiting current priority date; or
7. Leaves the country several months prior to the six-year limit and returns on an H1B for the remaining time.