With some notable exceptions (e.g. student and visitor visas), obtaining a U.S. visa is a two-step process.
The first step involves a petition filed with USCIS, the primary agency awarding immigration benefits. Upon successful adjudication of the petition, the beneficiary may apply for a visa to be placed into his/her passport in the United States. Almost uniformly, this requires an in-person interview at a consulate abroad. If a beneficiary is currently in the U.S. in another lawful status, it may be possible to collapse the steps together in a single filing.