It depends. If one is currently in H1B status with another company, then s/he may be legally allowed to start working for the new employer upon filing the H1B petition. Otherwise, one generally must await an approval of the H1B petition and a change of status. It is important to verify one’s eligibility to commence employment with the new employer to avoid unauthorized unemployment, which may lead to problems later, when attempting to adjust status to lawful permanent resident (LPR).
Prior to the law signed on October 17, 2000, referred to as the American Competitiveness in the Twenty-First Century Act (AC21), Legacy INS consistently took the position that a person could not start working for the new employer until approval of the H1B petition. Status issues can be complicated and, if there is any question as to whether or not one is authorized to engage in H1B employment, s/he should consult with an experienced immigration attorney.