A foreign national must apply for and obtain a student visa, to study in the United States. An international student must follow certain guidelines and submit few documents, to prove that he is eligible to study in America. F and M student visas allow international students to get into the United States as students. They may enroll in colleges, elementary schools, seminaries and in other academic institutions, that are accredited by the government of the United States.
If you enter into the United States on an F-1 student visa, you may remain in the country until you complete your course. Non-immigrant visas that are issued to foreign nationals who seek to stay in the country temporarily, are valid only for a certain period of time and such non-immigrants must leave the country at the end of their authorized period of stay. But F-1 visas issued to international students will permit them to stay in the country for the duration of their courses and status.
Even if your F-1 student visa expires, you can remain legally in the country as long as you are a student. If your student visa is valid for three years, you may stay in the United States as a legal student, until you complete your course. But remember that if you leave the country with an expired visa, you may not be able to re-enter the country with that expired visa. To get back to the United States, you will have to obtain a new visa by filing an application at an overseas Consulate or Embassy and with that new visa, you can enter into America and continue your studies.
An F-1 student can remain in the United States for an additional 60 days after the expiration of his visa and after graduating. He is allowed to do so to leave the country or to join another school. Similarly, an M-1 student will also be allowed to remain in America for an additional 30 days after the expiration of his visa.