Military is the armed forces of a nation, which may include the army and navy. The purpose of the military is to defend the nation from armed and violent attack, and to enforce the will of the nation on other people, sometimes even the people of their own nation.
Armies have long been in existence, with profesional armies, as opposed to militias of local men grouping together for more local purposes, in existence since at least the latter stages of the Roman Republic in the 2nd and 1st centuries BC, which expanded the Roman Empire on a grand scale.
The purpose of the military is to fight on behalf of their country, and its members are trained to kill others and to risk being killed themselves. To this end soldiers, sailors and aviators are trained to act in certain ways, to remain in formations even when those around them are dead or dying, and to handle weapons with care and respect.
Failure in maintaining good order whilst engaged in these tasks has the potential to risk defeat for the combatants, and even death for many of their colleagues. For this reason, Military discipline is often severe, and even brutal, the harshness of the punishment reflecting the severity of the consequences of failure. In history, military punishments often included military corporal punishments; in some countries to the present day.
The military may also be called upon to govern areas and regions, such as a country invaded and conquered, or even in parts of their own country where civil government has collapsed and disorder and anarchy threaten to run free. The other form of military government is when the military have overthrown the civil government, and taken over the running of the country. This frequently takes the form of a dictatorship.