The accident was reported at 9:54 a.m. at Seventh and Market streets and involved an F-Market & Wharves streetcar, fire spokeswoman Mindy Talmadge said.
The San Francisco Fire Department used heavy rescue equipment to free the trapped person. He was transported to San Francisco General Hospital and treated for non-life threatening injuries.
Market Street was expected to reopen by noon.
Bay City News contributed to this report.