If you’re visiting the United States on an F-1, M-1 or J-1 visa, merely being accused of a crime could have serious consequences. Some programs expel people who are charged with crimes. If you are expelled, your program is required to report it to SEVIS within 21 days. Since you are required to be enrolled full-time in school or sponsored by a program, expulsion could result in revocation of your visa even if you are ultimately cleared of the crime.
Coming to the U.S. on a student or exchange visa comes with the responsibility to maintain your immigration status while you complete your program. You can violate your immigration status in several ways, but the primary ones include overstaying your visa, reducing your academic load below full time and exceeding your work authorization.