The woman's children were transferred to the custody of Child Protective Services after the incident, which was caught on video by a store employee.
Melissa Medel, 38, is facing a charge of child cruelty and possibly other charges.
The incident happened Wednesday at a Bakersfield FoodMaxx. Shoppers and store workers were first drawn to the van after a 3-year-old boy got out of the the vehicle and was wandering around the parking lot, crying and looking for his mother.
Witnesses say the woman went outside and started cursing at and hitting the boy.
"She was verbally cussing him out in front of everybody in the store," said Mayra Law, a FoodMaxx worker who recorded much of the incident. "It was loud to where it got everyone's attention. She hit that little boy. She pulled him by the hair, shook him really bad when she was pulling the hair and then like I mentioned little boy had no shirt. She was hitting that little boy, striking that little boy with an open hand slapping him across the body."
Soon bystanders realized there was another child in the vehicle, who turned out to be a one-month-old boy.
The van's engine had been left on and the air-conditioning was running, but it was still hot inside the vehicle, Law says.
"The whole van, the windows were all up. The van was actually on. The little boy ended up unlocking the door so we could get into the van and the air wasn't even like cold. The car was on, and the AC was on but the inside of that car was hot."
A group of people tried to stand behind the van to keep the woman from leaving as they called sheriff's deputies, but that didn't work. People yelled at her that her newborn wasn't even buckled.
"We tried to stand behind the van to not let her leave but she ended up getting into the van and didn't care that we were back there. She almost struck us with her van and she took off driving like a maniac without the kids even being buckled inside the van."
Medel, who was later located at a motel in the area, was taken into custody and booked on a felony count of willful cruelty, according to the Kern County Sheriff's Office.