If your H-1B petition is not approved yet, you can ask your employer or the attorney to withdraw the petition. If your H-1B visa is already approved, you will need to file an application to change your visa from H-1 to F-1.
Runan Zhang, Esq.
www.runanzhang.com