Giant waves pounded the coast of California on Thursday, causing big headaches, closing beaches and toppling some people who watched the unusual waterfront show.

Waves topping 30 feet broke onto shores up and down the state, prompting stark warnings, such as one from the National Weather Service’s Bay Area division: “The ocean is NOT your friend today!”

High surf warnings remain in effect through early Friday, the Weather Service said, and waves surpassing 40 feet are possible. The coastal unrest was caused by a series of storms with hurricane-force winds brewing over the Pacific Ocean, pushing big swells toward the state.

“Stay away from rocks, jetties, piers, and other waterside infrastructure,” the Weather Service added. “Never turn your back to the ocean!”

Not everybody took the warnings to heart. A much-shared video on X showed little kids being pummeled by a big wave that threw them to the ground as they watched the surge on West Cliff Drive in Santa Cruz, 75 miles south of San Francisco. The children appeared shocked but fine as the water receded.

Mr. Hammer and his wife moved to Kingston Lane, which runs right up to the beach, after their previous house nearby burned down in the Thomas fire in 2017.

“We always said the only thing we have to worry about now is tsunamis,” he said with a laugh. “A lady who’s lived here 30 years said she’s never seen it like this.”

In one instance, a wave was powerful enough to crash over a beach wall, knock over adults and propel a truck down a road. Eight people were hospitalized with minor injuries from that wave alone, according to Andy VanSciver, a spokesman for the Ventura County Fire Department, which posted a video of the incident on X. Ten people were rescued from the water countywide, he said.

Becky Clearwater said she walked on Thursday from her home in Ventura to the beach to survey the storm surge and was surprised to see its consistency and strength.

“It was wave after wave after wave,” she said.

The waves destroyed a bench etched with the names of 20 dogs that neighbors had lost over the years, she said.

“It’s been our little thing for a long time, and we lost it today,” she said. “It’s gone, but we’ve already got plans in the works to build another one.”

In Stinson Beach, a coastal town about 20 miles north of the Golden Gate Bridge, the local Fire Department ordered the evacuation of several small roads near the beach because of a high risk of damage from waves and coastal flooding. Residents and visitors were told to “evacuate immediately for life safety,” and a community center was converted into an evacuation point. The order was lifted later in the day.

Heather Vantress, the owner of Sandpiper Lodging at the Beach, said she noticed that the tide appeared very high on her morning drive to the hotel, but that her business was not affected because it was high enough above the shore.

Thursday’s waves, she said, were nothing compared with the repeated battering of the town last winter, when California was hit by a series of atmospheric rivers.

“Last year, it was so bad people were freaking out — that was way worse,” she said. “The beach got really destroyed last year, but it all came back.”

Officials in Santa Cruz County warned residents to prepare to evacuate near Seacliff State Beach, not far from where intense waves tore a house off its foundations in January. On Thursday, crews elsewhere cleared debris scattered onto the shoreline highway by the ocean, and several car turnouts near area beaches were closed. Some streets in the area were flooded.

But the storm surge brought excitement, too — at least among the big wave surfers who were out at Mavericks, the famous surf break off the coast of Half Moon Bay, a town 30 miles south of San Francisco.

A local surf camera measured waves at “XXL,” noting that they ranged from 30 to 40 feet high. Crowds of people lined the cliffs to watch the surfing spectacle.

As residents cleaned up in Ventura, they were aware that more storm conditions and big waves were expected on Friday.

“I’m more worried about tomorrow,” Mr. Hammer said.