Cease enrollment at the school the student visa was granted under. The visa will be canceled after the student has had a break in studies of longer than five months, since the visa was granted contingent on enrollment.
Transfer enrollment to a different school than the original school the F-1 visa was granted under and apply for a new visa under the new school. Procure the new visa before entering the United States instead of transferring after arriving, according to Federal Law 8 CFR 214.2(f)(1)(C).
Leave the country and the F-1 visa will be automatically canceled after a five-month break in studies.