H-1B is a non-immigrant visa in the United States under the Immigration and Nationality Act, section 101(a)(15)(H). It allows U.S. employers to temporarily employ foreign workers in specialty occupations. If a foreign worker in H-1B status quits or is dismissed from the sponsoring employer, the worker must either apply for and be granted a change of status to another non-immigrant status, find another employer (subject to application for adjustment of status and/or change of visa), or leave the U.S.
The regulations define a "specialty occupation" as requiring theoretical and practical application of a body of highly specialized knowledge in a field of human endeavor including but not limited to biotechnology, chemistry, architecture, engineering, mathematics, physical sciences, social sciences, medicine and health, education, law, accounting, business specialties, theology, and the arts, and requiring the attainment of a bachelor's degree or its equivalent as a minimum (with the exception of fashion models, who must be "of distinguished merit and ability"). Likewise, the foreign worker must possess at least a bachelor's degree or its equivalent and state licensure, if required to practice in that field. H-1B work-authorization is strictly limited to employment by the sponsoring employer.
EB-2 is an immigrant visa preference category for United States employment-based permanent residency, created by the Immigration Act of 1990. The category includes "members of the professions holding advanced degrees or their equivalent", and "individuals who because of their exceptional ability in the sciences, arts, or business will substantially benefit prospectively the national economy, cultural or educational interests, or welfare of the United States, and whose services in the sciences, arts, professions, or business are sought by an employer in the United States".
EB-3 is an immigrant visa preference category for United States employment-based permanent residency. It is intended for "skilled workers", "professionals", and "other workers". Those are prospective immigrants who don't qualify for the EB-1 or EB-2 preferences. The EB-3 requirements are less stringent, but the backlog is much longer: typically 6 to 9 years, except for residents of India and China, for whom the backlog is even longer, sometimes more than 12 years. Unlike persons with extraordinary abilities in the EB-1 category, EB-3 applicants require a sponsoring employer. There is no "self-petition" category.