Q: I am in the US on a Nonimmigrant Visa which is about to expire -- but I can't get home, Is there any way I can avoid overstaying my visa?
A: First, the exact status in which you are in the U.S. needs to be determined. If you are just visiting from a European country, you may be here under the "Visa Waiver" program (having used ESTA to register). For any number of reasons unique to your situation, you may be here on various other visa types with a white card in your passport: a B-1/B-2 visitor visa, an F-1 Student visa , a visa that permits employment such as an H-1B, L-1, E-1, E-2, O-1, P-1, P-2, P-3, etc., or any number of other visa types.
Q: What do I do if here on "Visa Waiver" and only have 90 days?
A: Normally, there is no extension or change of status with this. But, you can try to apply for something called "Satisfactory Departure" from either U.S. Customs and Border Protection (if at an airport) or U.S. Citizenship and Immigration Services (if not at an airport). Satisfactory Departure provides a one-time 30-day extension; hopefully enough for the issue preventing departure to subside and travel to resume. The Visa Waiver entrant does need to leave within the 30-day period to be considered to have complied with U.S. law. If at the airport, seek out the Customs and Border Protection (CBP) office to apply. If not, look at the Office Locater link below for your nearest USCIS office. In many cases you will have difficulty entering the facility without an appointment, the best option may be to make an appointment using the InfoPass system (see link below).
Q: What if I have some other visa type that is expiring soon?
A: The answer here will depend on the type of visa. A standard B-1/B-2 visitor visa may be extended using the information available at the USCIS extension link below for this purpose, although there may be practical or logistical issues for many such as what might be used on the application as a U.S. address, and the three to five months wait for a response typical with these applications. The same procedure will not work for all nonimmigrant visas (and not for any of the employment-based visas). Many visas are strictly time limited by statute, others (crewman visas, fiance visas, and others) cannot be extended at all. You may find it best to seek legal counsel.
Q: Can I comply with U.S. law by leaving the U.S. by the required date but going somewhere else (Canada or Mexico) instead of to my home country?
A: Yes! The requirement is that you depart the U.S.by the expiration of the period of admission marked on the I-94 card, not that you return home. Even the J-1 visa, which in some cases does require that you return to a country of last residence to share skills learned here in the U.S., only requires this as a prerequisite to returning to the U.S. -- not for compliance with a mandated departure date.