The Torchwood Institute was founded by Queen Anne following an encounter with the Doctor, in which she was nearly killed by an alien "werewolf". The institute was granted the resources of the Torchwood Estate, the lord of which was killed in the incident.
Little is known about the organization between its founding and the 21st century, but by 2005, it had acquired enough alien technology to build a beam weapon capable of shooting down an alien starship.
Up until 2006, Torchwood was operated from Torchwood 1, which based its operations out of a London office building. Torchwood 1 had underground storage facilities for alien technology and carried out risky experiments with recovered technology. Torchwood 1 was destroyed when it accidentally unleashed simultaneous invasions by Cybermen from an alternate history and Daleks that had been hiding in a space-time bubble.
Torchwood 2 is in Glasgow, but little is known about it.
Torchwood 3 is situated atop a space-time rift in Cardiff, where a variety of "debris" from the space-time rift "washes up" on Earth. It has a staff of four, including Captain Jack Harkness.
Torchwood 4 apparently disappeared under mysterious circumstances.
Torchwood 1 had substantial resources and a large staff, including a unit of commandos, but it proved no match for a unit of invading Cybermen.
Torchwood 3 has a staff of only four and is only capable of handling small alien threats; it would be overmatched in a large-scale invasion.