What do you mean by "foreign student"?
A US citizen or permanent resident who completed the usual requirements for med school admission, was not accepted, and went to a foreign med school to study?
OR, a non-US citizen or non-permanent resident who is studying medicine in his/her home country?
In the first case, the chances are not very high. You would have to take the USMLE step one and get a high score. Most US med shools do not accept transfers even from other US med schools, some accept transfers of US citizens or permanent residents from foreign med schools and some of these may restrict the places to state residents; the number of spots open for transfers usually varies with the number of students lost during the first two years, and all, or almost all restrict transfers to the third year class.
Transfers of non-US citizens/non permanent residents must be very rare if indeed any occur at all. Such individuals may apply for residencies after completing their medical degree, but they must go through the Educational Council on Foreign Medical Graduates (ECFMG), pass four national exams (the first 3 the same as US students take for licensure, the 4th a hands-on clinical exam, and TOEFL) to be certified eligible for residency.