A resident is a physician PGY-2 or above who is completing his/her specialty training.
A fellow typically has finished their residency and is doing an additional 1-3 year subspecialty in a particular field.
An attending is a physician who has finished it all and is working as well as supervising the residents, interns and medical students.