In theory, if you have maintained B-1/B-2 status and meet the requirements for the F-1, it is possible to change status here in the U.S.
However, there are potential problems and you should speak with an immigration attorney about you own situation. There may be problems if you try to do this too soon after B-1/B-2 entry, and there may be other issues as well.
If you were not granted a change of status or chose not to apply for one, you would need to leave, get the visa stamp and return. Only your home country consulate will definitely take your visa application; other countries have discretion to process it or not (unless you have a prior overstay which would require you to go to your home country consulate).
Again, discuss this with an attorney.
As noted by the previous attorney, you must be very careful not to go on the record contacting the school too soon after you have arrived in B-1/B-2 status. US Immigration may deny a change of status application to F-1 status where there is "contact" with a school up to 45 days after your tourist entry into the U.S. This "contact" may be documented by school forms you filled out to apply to study there or to pay your tuition. Further, the US Immigration Service may deny an application to change status to F-1 if you "file" it within 60 days of your entry as a tourist.
However, despite all of this, it may be better if you apply outside of the country at a U.S. consulate for your student visa. This is because you cannot begin studying at the U.S. school until a Change of Status application is approved. Depending on where you live, it may be several months before the application is approved. Hence, if you are able to obtain an appointment at a U.S. consulate quickly, this may be faster and more convenient -- in order to make plans to begin your studies. You can only apply at (1) your home country consulate, (2) a consulate in a country where you have legal residence, or (3) if you have previously been granted a student visa, then you may be able to apply again at a U.S. consulate in Canada or Mexico as a third country national.
Please contact a reputable law firm for assistance (Note: Many out-of-state attorneys can legally help you because we are permitted to practice federal immigration law outside of our state of jurisdiction).