Modesto is a teacher who sees dead people, a gift that has cost him dearly—money spent on psychiatrists and being fired from every school he has worked in. His luck changes when he is hired in Monforte to teach five students who have turned a prestigious school into a house of horrors. Modesto must get them to pass their pending subject and leave the school once and for all, but it will be no easy task: all five students died twenty years earlier.
Years in the past, Modesto was at his high school dance when he started dancing with another student. When the other students began laughing at him, it was revealed that he was dancing with a ghost that only he could see.
Now in the present, Modesto is suffering due to his inability to distinguish ghosts from regular people, and he's fired from his seventh teaching job. He's also been continuously seeing a therapist who inappropriately labels his problems as repressed homosexual feelings. Elsewhere at the Monforte school, teachers are harassed by five deceased students, and their actions threaten to shut down the school. Principal Tina hires Modesto because of her years of experience.
On his way to his new classroom, Modesto is misdirected and finds an abandoned room with five ghost students. While they initially try to scare him away they finally realize that the living man can see and communicate with them. Modesto leaves the school thinking he's going crazy, but Principal Tina convinces him that she believes him and urges him to rid the school of the ghosts.
Modesto consults a ghost that he often sees at his therapist's office who explains how all ghosts have unfinished business. He concludes that all five students need to graduate, and with some reluctance, all of the students study and pass their exams. However, after they pass, they do not ascend as he hoped; they turn their back on him and continue terrorizing the school. Modesto is dismissed as his students wreak havoc and Tina the principal loses faith in him.
Dani, the most rebellious of the students, wants to keep pulling pranks and causing trouble, and he even has the ability to possess people. It is revealed that Dani started the fire in 1987 to force all five students out of detention before they died. He fears his actions will condemn him to a bad place after he moves on from the ghostly realm, but ultimately his friends forgive him.
Mariví's boyfriend Chema wrote a letter but it was accidentally placed in Ángela's locker. Ángela kept the letter to get back at Mariví, but was eventually compelled to give it back. Mariví's boyfriend wrote to her that he didn't want to get married, that he wasn't sure the child was his, and that Mariví should forget him.
Founder's Day, a celebration of Principal Tina's father who was the former principal arrives. The chair lady has yet to determine if she will shut down the school or not attend. While there, Ángela possesses a student and begins to sing beautifully. She ascends, since in life she was never allowed to join the choir because her parents didn't want her to divide her time with studying.
Jorge starts chatting with a living student named Elsa with Ouiji boards and computers. She decides she wants to join him in the afterlife so she tries to drown herself in the pool the night of Founder's Day. She briefly sees Jorge before Modesto successfully performs CPR and revives her.
Pinfloy, an avid Pink Floyd fan who died drunk and is always experiencing side effects such as nausea and trouble concentrating, only wanted to travel to Pacha. Modesto and the other students bring him to the school's party and Pinfloy interprets it as Pacha and is able to enjoy his last wish. He eventually has a hangover while Mariví starts to feel labor pains which indicates a new passage of time for them. They all hold hands and ascend into the next part of the afterlife.