A burger is a kind of sandwich. It was developed in America so that people could have a quick meal without getting their fingers greasy.
The burger arrived just after the invention of the meat grinder. Before that, meat had to be eaten in slices. Meat was also expensive, and so eating meat only became popular after meat prices fell. This happened in America because there was a rapid expansion in cattle ranching in the west of the country.
The first hamburgers were sold with hot meat patties in fairs. Only later did they become popular as fast-food items.