The H-1B category of nonimmigrant work visa is given to those foreign workers who are here to work in a specialty occupation for a specified amount of time. With this visa, a foreign worker is allowed to live and work legally in the United States for a total of six consecutive years. The visa also entiles the foreign worker's family to live in the United States on an H-4 visa, however they would need to file additional applications to work themselves.
As a nonimmigrant visa, the applicant is the U.S. employer, while the beneficiary is the foreign worker. This means that the foreign worker's ability to remain in the U.S. is tied to maintaining the position he or she was hired for by the applicant.
One of the principle requirements for an H-1B visa is that a foreign worker has specialized knowledge for the occupation they will have in the U.S. This means that they must have at least a U.S. bachelor's degree, foreign equivalent, or equivalent work experience. For example, having a three-year degree and three years of relevant work experience will generally fulfill the equivalency test. Occupations typical of H-1B visa holders would include fields such as Engineering, Mathematics, Biology, Law, Education, Sales, Accounting, IT, and Marketing. This list is not exhaustive though, and what is important is to prove that the beneficiary's knowledge is indeed specialized for the specific occupation.
In addition to the requirement that the position filled is a specialty occupation, the employer must also file a Labor Condition Application (LCA) with the Department of Labor. The LCA attests that the employer is paying the foreign worker the prevailing wage for the work performed, and that hiring said worker will not negatively affect the wages of similarly employed U.S. workers.
As stated above, the total amount of time a foreign worker can remain under H-1B status is six years. The initial application can be for up to three years, the second extention for up to two years, and any additional extension for one year. However, time spent abroad does not count toward this limit. Foreign workers have the option to "recapture" this time and add it to the six year limit, potentially adding anywhere from weeks to months of time to work in the U.S. legally.