Alexander, who is also a reserve police officer, was reportedly making sure the gun wasn't loaded by pointing it at the ceiling as part of a firearms safety demonstration at Seaside High School.
Read more: Donald Trump, NRA double down on arming teachers following Florida school shooting
Seaside Police Chief Abdul Pridgen said that no one was hit by gunfire and that one student suffered "an abrasion to his neck."
However, local media reported that three students were injured in the incident, when they were struck by falling debris from the ceiling. Police officials refused to confirm this.
Alexander has been put on leave from both his position as a teacher and as a reserve officer, authorities added. Carrying a concealed weapon onto a school or college campus has been banned in California since 2015. Officials said they were establishing whether Alexander had violated any laws or regulations by bringing his handgun into the classroom.
Parents shocked and upsetFermin Gonzales, the father of the 17-year-old boy with neck bruising, told local broadcaster KSBW that the teacher had wanted to show the class how to disarm someone and was checking to see if the weapon was loaded.
"It's the craziest thing; it could have been very bad" Gonzales said, before stating that the red mark on his son's neck appeared to have been caused by bullet fragments.
Read more: 8 facts about gun control in the US
Gonzales also told local media that the school had not informed any of the students' parents of the incident and that he was shocked to see his son return home with blood on his shirt and what appeared to be bullet fragments lodged in his neck. The family subsequently rushed to the hospital for X-rays to be taken.
"I'm just pretty upset that no one told us anything and we had to call the police ourselves to report it," Gonzales said.
The boy's mother, Crystal, said that the class went on as normal following the incident, while her son continued to sit at his desk unchecked. It then took police around three hours to arrive at the school to investigate the incident, she added.
In a letter to parents, the Monterey Peninsula Unified School District said it would immediately begin investigating the incident and that counselling had been made available for students.
Read more: European gun-makers flood the US with firearms
Students rally to end gun violenceWednesday's accidental classroom shooting comes in the wake of last month's massacre in Parkland, Florida, which left 17 students dead.
The mass shooting in Florida has ignited debate over whether teachers in schools should be armed, a policy favored by both President Donald Trump and Education Secretary Betsy DeVos.
Students across the US walked out of classes on Wednesday as part of a nationwide protest against gun violence. Many gathered outside of the White House chanting "Never again!" and "Enough is enough!"
Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.
dm/jm (AP, AFP)