Having a valid H1b visa, you can switch jobs. However, you need to apply for a transfer with all details and documentation from your new employer. It does not mean that you have to wait for that decision. Once the transfer application is submitted, you can start working with the new company. Your H1b visa is not a permanent residence. If you cease to work and can’t get another employer to petition you as a specialized worker, the visa will be revoked.