The U.S. government uses the term nonimmigrant to refer to foreign nationals who are admitted to the United States temporarily for a specific purpose. By contrast, the term immigrant refers to foreign nationals who wish to come to the United States permanently.
F-1 and M-1 students are considered nonimmigrants because their sole purpose for coming to the United States is to complete a program of study at a Student and Exchange Visitor Program-certified school and any associated practical training, both of which have set start and end dates. Once an international student fulfills their purpose for coming to the United States, they need to either change their status or depart the country.
There are other government terms related to studying in the United States. Check out the Study in the States glossary for definitions of those key terms to help you better understand the international student life cycle.