Here is the hierarchy of medicine:
Attending Physician: Out of residency (and felloship if applicable), has the final say and responsibility for patient care. Teaches everyone below him/her. Earns a good salary.
Fellow: Has graduated from residency and is pursuing subspecialty training (e.g. cardiology, GI, cardiothoracic surgery, neuroradiology, etc.) Depending on the service, may teach a lot and lead a team in the absence of the attending.
Resident (Post graduate year-2 (PGY-2) through residency graduation). Usually runs day to day operation of the team and directs interns (PGY-1), senior, and junior medical students.
Intern (PGY-1): Does much of the floor work on the team. Answering pages about patients problems. Depending on the specialty and service, the intern may have primary teaching responsibility for third year medical students.
Answers to the resident and attending.
Senior medical student (MS-IV): On some rotations such as sub-internships, they have a lot of responsibility and are similar to interns except cannot right orders without a cosignature. On other rotations, they are considered similar to third year students and have little responsibility. Can teach MS-IIIs if they want.
May answer directly to residents instead of interns.
Junior medical student (MS-III): Lowest rung on the ladder. Basically clueless for the first few months. May do a lot of "scut" like getting radiology films, gathering labs. As the year goes on, usually get more responibility. They work with interns frequently, and residents and attending occasionally.