If you are a nonimmigrant alien, and are coming to the United States, you most likely will be dealing with two documents: a visa and a form I-94. Please be aware that these two documents are different, and serve different purposes.
A visa gives you permission to enter the United States, subject to approval by an immigration official at your port of entry. The visa allows you to enter the U.S., subject to permission by officials. The latest time you are allowed to enter is determined by the expiration date of the visa. In other words, if you have a visa, and it is expired, then you cannot enter the United States on that visa if you are outside the United States at that moment. The visa, however, loses its significance once you have used it to enter the United States. That visa, and specifically its expiration date, has NOTHING to do with how long you may remain in the United States. In fact, you possibly could even be in the United States legally even though your visa has expired.
The reason for this situation is a second document that most aliens receive when they arrive at a port of entry, or beforehand while they are still on the airplane. This document, form I-94, is an arrival document, and it--not your visa--determines how long you may remain in the US.
You will fill out much of the I-94 prior to arrival, and later, an immigration official will stamp that I-94 and indicate your latest date of departure. That date is critical, and you normally must leave the United States on or before that date. In some cases, rather than a specific date, an I-94 will have a notation of "D/S." This abbreviation stands for "duration of status." It means that the alien may remain in the US so long as he or she maintains the conditions of his status. For example, a student in F-1 status may remain in the US so long as he or she continues to meet the requirements of a person in that status.
Let's take the example of Ling, a student from China who will be studying for one year at a university in the United States. Ling's F-1 visa has an expiration date of September 15, 2010, meaning that in order to enter the United States, Ling must enter on or before that date. Suppose Ling enters on September 1, 2010, and at the airport, receives an I-94 with a stamp of D/S.
Ling finishes the program, graduates and returns to China on June 10, 2011, all the while maintaining valid status. Even though the visa expired on September 15, 2010, Ling has not run afoul of any regulations. Her maintaining valid status kept her in good standing with respect to her I-94. Of course, if Ling wishes to return to the US in the future, she will need to apply for and receive another visa. Her old visa will not help her, nor will her I-94.
Perhaps an analogy will help. While a student at the university, Ling would probably need her student identification card to enter the library. But once in the library, she wouldn't need the card to move within the library. Also, her card has nothing to do with how long she can stay in the library. She would need to leave when the library staff announces closing. Furthermore, if Ling leaves the library, she would need to show or swipe her card again in order to re-enter.
Therefore, her identification card is like her visa, because she needs it to enter. The announcement of closing time is like her I-94.