An H-1B visa is a nonimmigrant visa issued by a U.S. Embassy or Consulate abroad. H-1B status is a nonimmigrant status issued by the USCIS to foreign nationals already residing in the U.S. or upon entry with an H-1B visa. Legal status allows you to stay legally within the U.S. while a visa allows you to seek entry into the U.S. legally.
Yes, you may apply for Change of Status to another nonimmigrant visa category for which you qualify. USCIS officers have been allowed to exercise their discretion to grant you another nonimmigrant status, if you apply for change of status shortly after your H-1B status is terminated, usally within 10 days after you are fired.
Note: If you are not planning to depart the U.S. the only way to maintain legal status is to file a new petition under a new employer or change status from H-1B to other nonimmigrant status, such as B-1 or B-2.