A militia is an informal, part-time, or temporary armed force which differs from conventional military forces in that its members are generally regarded as civilians mobilized in an emergency. The British Home Guard during the Second World War was a militia force.
Militias generally operate only on their home territory. However, formations such as the United States National Guard and the British Territorial Army serve as adjuncts to the regular forces and may be deployed overseas, and are not militias.
Militia in the US
The First Congress wrote the Second Amendment to include the Right to Bare Arms framed in terms of a militia. One of the reasons, the Right was written was as a precaution that should there be a danger imposed within the borders of the States, there would always be people ready to fight against the threat. Many people claim that it was written to protect individual citizen's right to self-defense and as a check against possible police state or tyranny of the government against the people.
The usage of the word "Militia" is key here. During the early age of America, the word meant: "Any able-bodied male citizens between 18-45 with access to a gun." In modern America, the age and gender limit has been changed to include women, however, the statement remains the same. All Americans have the right to carry weapons as they are all part of a Militia. As shown by the modern 10 US Code §311.
The State militias have evolved over time into the present National Guard.