The first automatic portable machinegun in the world was invented and created by Hiram Maxim in 1884. Maxim used the energy of each bullet's recoil force to eject the spent cartridge, insert the next and fire it. This allowed the Machinegun to shoot as long as the shooter wanted to shoot, or until the bullet belt would run out of bullets.
The Maxim Gun was adopted by the British Army in 1889. The machinegun was first used by the British colonial forces in the Matable war in 1893-1894. In one single engagement, fifty police of the Rhodesian character company fought and killed off altogether 5,000 Matabele warriors with just four Machineguns. The design of Maxim's gun was taken over by the Vickers Company and was used by the British army for over seventy years.
The Maxim Gun could fire 400-600 rounds of small-calibre ammunition per minute. Each gun had the firepower of about 100 rifles.
The German Army's Maschinengewehr and the Russian Pulemyot Maxima were both based on the Maxim gun design. The U.S. Military tended to use the Browning Machinegun and the French Army preferred to use the Hotchkiss.
Machineguns were positioned all along the Western Front in the WW1. The machineguns that were used in 1914 required a crew of three to six men and were positioned on a flat tripod. For added protection, German machineguns were often housed inside concrete blockhouses so that they would be atleast a bit protected from bombs.
Both sides also used smaller machinegun posts. Germans built them in large numbers all along the line at Ypres and Messines. Machinegunners were deeply hated by the infantry and they were more likely to be killed than any other soldier when captured.