The teen victim was in critical but stable condition, Kern County Sheriff Donny Youngblood told a press conference. The sheriff said the teacher suffered a minor pellet wound to the head but declined treatment.
When the shots were fired, the teacher began trying to get the more than two dozen students out a back door and also engaged the shooter in conversation to distract him, Youngblood said. A campus supervisor responding to a call of shots fired also began talking to him.
"They talked him into putting the shotgun down," Youngblood said.
The sheriff said that at one point the shooter told the teacher, "I don't want to shoot you" and named the person he wanted to shoot.
The shooter may have had up to 20 shotgun rounds in his pockets, he said.
Officials said there's usually an armed officer on campus but the person wasn't there because he was snowed in. Taft police officers arrived within 60 seconds of first reports.
The shooting occurred about 9 a.m. at Taft Union High School in a community of fewer than 10,000 people amid oil and natural gas production fields about 120 miles northwest of Los Angeles.
As word spread, Dayna Hopper rushed to the school to pick up her son Joseph Sorensen, 16, and daughter, Cheryle Pryor, 15, who had called from Cheryle's cellphone.
"I panicked. I wanted to puke and just get here," Dayna Hopper told The Bakersfield Californian.
KERO-TV Bakersfield reported that the station received phone calls from people inside the school who hid in closets.
The bell had just rung at a nearby school when teachers began shouting for students to get inside buildings, and the principal used an intercom to tell students to stay inside, Felicity Reich, 13, a student at Lincoln Junior High School, told the newspaper.
Shaken, she held the hand of her mother, Ellie Reich, as she spoke.
The student who was shot at the high school was flown to a hospital in Bakersfield, said Ray Pruitt, spokesman for the Kern County Sheriff's Department.
About 900 students are enrolled at the high school, which includes 9th through 12th grades.
Masses of parents headed to the school football field to find their children, and officials at other schools took action to protect their students as well, the newspaper said.
The Taft shooting came less than a month after a gunman massacred 20 children and six women at Sandy Hook Elementary School in Newtown, Conn., then killed himself.
That shooting prompted President Barack Obama to promise new efforts to curb gun violence. Vice President Joe Biden, who was placed in charge of the initiative, said he would deliver new policy proposals to the president by next week.
At the state Capitol, Assembly Speaker John Perez, D-Los Angeles, said the thoughts and prayers of legislators were with the people at the Taft school.
"It really is just another very sad moment as we deal with the ongoing reality of gun violence that has captured so much of our attention this last year," Perez said.