The 23-year-old limped out of Spain's 1-0 win over France on Wednesday in the 23rd minute and a subsequent scan revealed the extent of the damage.
Torres is set to miss Liverpool's trip to Chelsea in the Premier League on Sunday, their FA Cup clash with Barnsley on February 16, but should be fit in time to face Inter Milan in the Champions League on February 19.
A statement from club spokesman Ian Cotton on the club's official website said: "Fernando was examined by medical staff when he returned to Melwood.
"A scan later confirmed their diagnosis that he suffered a hamstring tear in his right leg. Fernando is expected to be out for approximately 10 days."