In 1925, a Canadian patent was filed for the field-effect transistor principle by Austrian-Hungarian physicist Julius Edgar Lilienfeld – but no research was published, and his work was ignored by industry. In 1934, another field-effect transistor was patented by the German physicist Oskar Heil. While there was no evidence any of these devices were built, subsequent work in the 1990s proved one of Lilienfeld’s designs to be effective.
During World War II, efforts to produce extremely pure germanium (a chemical element and semicondiuctor) “crystal” mixer diodes for radar and microwave units, preceded the development of the transistor.
After the war, a Bell laboratory team failed in several attempts to build a triode-like semiconductor device. In 1947 Bell Laboratory’s William Shockley and a co-worker Gerald Pearson built a successful triode-like semiconductor device that became known as the transistor.
Source: History of the transistor
A transistor is a miniature electronic device that acts either as an amplifier or a switch. When it works as an amplifier, it takes in a tiny electric current at one end (an input current) and produces a much bigger electric current (an output current) at the other. When it works as a switch, a tiny electric current flowing through one part of a transistor can make a much bigger current flow through another part of it.