World War I lasted from 1914 to 1918, although the peace treaty was not signed until 1919.
There were many small countries in Europe before the start of the First World War. To protect themselves from an attack by larger neighbours, these countries all made treaties with other countries. The bigger countries all agreed to come to the help of the smaller countries if attacked. It was a nightmare of treaties.
There was a further problem. Some people wanted to overthrow the governments of their countries (as still happens around the world today). One of the leaders of a small country was shot by an assassin. This brought in to play all of the treaties, so that, quite quickly, all of the countries in Europe were at war.
Now the British, French and Germans all had empires, so this meant the empires were also at war. That is how it became a world war.
At the beginning, the United States was not involved. It wanted to stay out of the European fight. But then, in1915, the ocean-going liner Lusitania was torpedoed and sunk by a German U-boat, with heavy loss of life, including Americans. This turned Americans against Germany. But then the Germans did more stupid things that made the United States more and more angry, until it declared war in 1917.
Meanwhile, the Europeans were fighting in the way they always had. They had huge armies that lined up against one-another and slugged it out. They dug trenches and as a result, hardly moved for three years.
The number of casualties in the war was immense, as each side tried to move forwards. But the problem was that by this time each side had machine guns and bombs, so no side could advance without being cut to pieces.
There were many famous and terrible battles in this period. In 1917 the Americans arrived to help the Europeans and this tipped the balance. The war ended on the 11th hour of 11.11.1918
To find out why this was not the war to end all wars, read the topic World War 2.