Undocumented student visa

Can a undocumented student get a student visa if they accepted to the college?

Short answer: highly unlikely.

Long answer: You would need to go to your home country and apply for a visa there. It seems unlikely you would be granted one under the circumstances of usually living undocumented in the US ( a student visa is a non-immigrant visa and the consulate may require you to show ties to your home county/reasons to return after you have finished school). It will be especially unlikely if you are over 18, which is when the government starts calculating your period of unlawful presence - it is very difficult to get a non-immigrant visa with unlawful presence on your immigration record.

Can I apply for a student visa here?

No, visas are only issued outside the US at embassies/consulates. If you were in another legal status here you could apply to change your status to student status (F1), but this avenue is not open to you as cannot change status from an unlawful status.

You cannot get a US passport. You’d have nothing to attach a visa to (a visa would be issued by the passport of the passport issuing country to enter, attend classes, do business, work, stay for an extended period).

There are some schools/states that allow undocumented students attend without a visa. You would not be eligible for federal financial aid, but some schools/states have a different pot of money for those who can’t get federal aid.