An H1B holder can't simply move from their sponsoring company to another in the same way that a permanent resident or citizen can, but an H1B can be transferred to another company that also meets all the requirements. There's paperwork involved, but it's definitely possible and legal.