When was the first computer invented?

The complete history of when the first computer was invented, including all types of computers back to 1822.