Well the first machine capable of being programmed was invented in 1822 by a man called Charles Babbage, which was essentially a massive calculator that you could program, he invented because he was tired of human error in maths problems.
In 1936 what is considered to be the first functional computer was created by Konrad Zuse which took up his entire living room.
Also in 1936 the Turing machine was proposed by Alan Turning which became the foundation of theories for computing and computers, he developed the enigma which was used for cracking code in the second world warn.
The first electric computer was created in 1943 to help decrypt German war messages.
The first digital computer took 3 years to build and weighed almost 50 tonnes (so about 50 cars). It was called the ENIAC and was considered to be the first fully functional digital computer.
I am a massive fan of Alan Turing, who was the father of computing as we know it. He was a mathematician, code breaker and all round genius. During World War II, Nazi Germany had a seemingly unbreakable code called Enigma. In 1938, a group of Polish mathematicians cracked the enigma by hand, very slowly. They sent their method to Britain when the Germans conquered Poland in 1939 and Alan Turing was brought into a team, whose job it was to crack the code.
Turing knew that he needed a machine to crack it in a way that was useful. Crackign enigma by hand was slow and often meant messages were cracked after their contents (say mission orders for bombing a city) had been followed through on.
He designed a computer to do it, called Collossus and in 1943 Collossus started cracking the enigma code. This design pretty much ensured that the Allies would win World War II, it is estimated Turing knocked 2 years off the length of the war.
Turing continued his work after the way, but died in 1954. His death probably set our modern society back a decade. If he had lived a full life we would be much further ahead, he was miles ahead of the rest of the human race when it came to computers, we still use some of his ideas today.
After Turing, the first non-military computers were built, they were huge things, the size of a room, but since then they have continued to get smaller down to the size we have today.