A teaching hospital has a federally funded program to train interns, residents and sometimes (in bigger facilities) fellows. The facility must meet standards and guidelines for the specific specialty programs that they offer training in. The housestaff at the hospital are usually faculty in the medical school as well. Their practice and their patients serve as the clinical sites for the interns, residents and fellows. The 4th year medical students must put in their preference for their specialty and where they would like to do their internship and residency. Different specialties require different things (grades, experience in certain areas, references, etc...). They even conduct interviews to place students. Then there is a day in early spring, I beleive, where the 4th years (who graduate in June) will find out where they were accepted to do their post-grad training.
The misconception is that a teaching hospital has all kinds of students. While that is often so, the true definition of a "teaching hospital" is a place to train future MD's, and has nothing at all to do with other disciplines or professions.
Most teaching hospitals are in large cities in large medical centers, and usually several nursing schools are around, and there will be nursing students in the clinical sites, as well as students in other disciplines.
As for orders by medical students (those who are enrolled in medical school, haven't graduated yet, and have not earned the MD title yet)...when I was at UAB Medical Center, the policy was that they could write whatever they wanted, but the roder would not be acted upon until it was cosigned by their intern, resident or attending physician. The initials that medical students use after their names should be MSIII (3rd year) and MS IV (4th year).
One thing of lesser importance, but interesting... my nursing students figured out quickly that the medical students wore hip length (short) white lab coats, and the interns/residents were the ones who looked extremely tired all the time from lack of sleep, and the attendings wore the long (to the knee) lab coats. They joked that they needed to date the attendings who were done with school and had money to spend, not the others who were still in training and had student loans.