First off, there are many different classifications of computers. Thus, there is no way of identifying which computer was invented first. Instead, I present you all with some of the first computers ever revealed.
In the year 1822, Charles Babbage conceptualized and developed the Difference Engine. This was believed to be the first automatic computing engine. It could compute groups of numbers and make physical copies of the results. However, due to funding issues, this machine was never built. But in June 1991, the London Science Museum completed the Difference Engine No. 2. This was built for the bicentennial year of Babbage's birth. Later, the museum completed the printing mechanism. Below is a video providing some information on the machine.
Here we have the first ever general mechanical computer. This is the Analytical Engine. This was the first general-purpose computer concept to be proposed. This too was proposed by Charles Babbage. Unfortunately, it was never designed due to the same reason as before. The project did not receive enough funding for development. Fortunately however, Charles' youngest son Henry, completed a portion of this machine. Built in 1910, it was able perform basic calculations.This is a picture of the Analytical Engine.
The first ever programmable computer did not come until 1938. This computer is known as the "Z1." It was built by Konrad Zuse in his parents' living room. This was believed to be the first electro-mechanical computer. This also was really the first functional computer. The picture of the Z1 below is a replica.
The Colossus came to be known as the first electric programmable computer. It was developed by Tommy Flowers and first introduced in 1943. This computer was primarily designed for one task. It assisted the British code breakers in reading encrypted German messages during World War II.
The Turing Machine was first proposed by Alan Turing in 1936. This machine became the basis for theories about computing and computers. The machine printed symbols on paper tape. This was in a manner that emulated a person following logical instructions. Without these principles, we wouldn't have the computers we possess today. The picture below is a rebuilt version of the original machine.
As you can see, computers looked and worked very differently back then. They were big and cumbersome. They took up a lots of room space. This was because computers had greater amounts of components at the time. The components themselves were also big. We did not possess the knowledge or technology to develop today's components. Today's computers are smaller, faster, and easier to use. But just think of how complex they were in previous years. Not to mention computers weren't available to the public at first. They were designed to fulfill very specific purposes. Be thankful to those who created the first computers. Without them, we would not possess the technology we have today.