Based upon what you have written, your illegal status of living in this country should not bar you from getting an F-1 student visa to remain in this country to study. I suggest that you go to the nearest immigration department and submit your application for such a visa through the assistance of an immigration attorney.