As with any nonimmigrant (temporary) visa, when your stay on F-1 (academic student) visa is over, you are expected to leave the United States.
Unlike most visa entrants, students are not typically given a precise departure date. When they arrive in the U.S. on student visas, the border control officers normally make a "D/S" notation in the I-94 Arrival/Departure Record (accessed online at the CBP website).
The D/S notation stands for "duration of status." In other words, you're allowed to stay in the United States for as long as you are pursuing a full-time course of study or followup practical training and otherwise complying with the terms of your F-1 visa.
In addition, you may stay another 60 days to prepare for your departure from the U.S. or to transfer to another school.
Pay no attention to the date that the actual F-1 visa that you originally received at the U.S. consulate expires. That is simply the last date upon which you could use the visa to enter the United States, not the date by which you must leave the United States. This is a common source of confusion, but realize that a visa is simply an entry document. The I-94 controls the length of your stay as a nonimmigrant.
Staying beyond the time allowed on your nonimmigrant visa is a violation of U.S. immigration laws and carries various consequences.
First off, if you overstay by even by one day, your visa is automatically void. (See § 222(g) of the Immigration and Nationality Act or I.N.A. or 8 U.S.C. § 1202(g).) The practical consequence of this is that, if you had been intending to apply for an extension or change of your status without leaving the United States, you will not be able to do so. You will instead have to go to a U.S. embassy or consulate outside the United States (most likely in your country of nationality) to apply for a new visa.
Even more serious consequences start to arise if you accrue six months or more of "unlawful presence," as described next.
A nonimmigrant over the age of 18 who overstays an authorized stay on a U.S. visa ordinarily accrues what's known as "unlawful presence," an important concept within U.S. immigration law.
If you accrue unlawful presence of six months or more, then voluntarily leave the United States and apply to return (whether with a nonimmigrant visa or an immigrant visa/green card), you will be considered inadmissible and barred from reentry for three years. If you accrue unlawful presence of one year or more, you will face a bar on reentry of ten years. There are waivers available in certain limited circumstances, but they're not easy to get.
So, let's say that after hanging around in the United States for a year after your studies have ended, you receive a job offer from a U.S. employer, who hopes to help you get a green card. Because your visa is void, you will not to adjust your status (apply for a green card) within the United States.
But if you try to apply for the green card at a U.S. consulate in your home country, you'll face the three-or ten-year time bar. The employer is unlikely to willingly wait another three or ten years for you to come back and start work!
An important question for people on student visas, however, is when their period of unlawful presence began. Given the absence of a date on your I-94, this is a determination that's not easily made. Therefore, the law says that unlawful presence on an F-1 visa begins when a Department of Homeland Security (DHS) official or an immigration judge actually declares you to be unlawfully present, regardless of the date you began violating your status. But consult an attorney for the latest on this; the Trump Administration has been trying to undermine this rule, and the matter is (as of mid-2019) the subject of ongoing court proceedings.
If you have stayed beyond the time permitted on an F-1 visa, but are hoping to find a way to remain in the United States legally, consult an experienced immigration attorney for a full analysis of your case and assistance with further applications.