The blaze was reported at about 7:35 p.m. Saturday on Lucy Street, between Thornton and Williams avenues, and was extinguished by around 8:10 p.m.
Two people were taken to San Francisco General Hospital, and a third was taken to Saint Francis Memorial Hospital.
Fire department spokeswoman Mindy Talmadge said two of the victims' injuries are considered life-threatening.
The fire caused about $300,000 in damage to the structure and $75,000 to its contents, Talmadge said.
The blaze also knocked down a power line, causing a brief outage that affected 31 PG&E customers.
The American Red Cross was notified of the fire but did not need to find housing for the 10 people displaced because they are staying with relatives, Talmadge said.
The cause of the blaze remains under investigation, but the fire is believed to have been accidental, Talmadge said.