A “billet” can refer both to the lodging for soldiers and sailors and to orders to provide such lodging. Historically, such orders were sometimes quite controversial; they were a major bone of contention in the American Revolutionary War, for example, when colonists resented being forced to house British soldiers. The term is also used in American English to refer to a position, posting, or assignment within the military, although this usage is not universal.
In British English, “billet” is used to refer to official military housing for soldiers; billets may also be known as barracks. Barracks take a number of forms, ranging from dormitory style housing for single enlisted men and women to family housing to officer's homes. Typically, a single base will have a range of styles available to meet various needs, and people are invited to apply for housing which is assigned on the basis of rank. Some soldiers also refer to off-base housing as their “billet,” in the sense of “I'm heading to my billet for the night.”
In the sense of an order to house soldiers, the concept of a billet is actually quite ancient. In fact, this was probably the first sense of the word, because it originated from the Latin bulla, which means “official document or seal.” The concept of providing dedicated housing for soldiers is actually relatively recent; historically, soldiers expected civilians to provide housing as they traveled, often carrying around official documents to enforce this tradition.
While some civilians may have been quite amenable to the practice of billeting, especially when soldiers were arriving to protect them, others did not view the practice amicably. Billeted soldiers could at times be highly disruptive, eating a family's food supply and causing other forms of damage to a home, farm, or community. In the case of the American Revolution, so-called Patriots who opposed British rule did not appreciate being forced to house soldiers of the crown. Opposition to the concept was so strong that a proviso was built into the Bill of Rights to protect citizens from being forced to house soldiers.
In the final sense, a “billet” is simply a position within the military. Some billets are viewed as more enjoyable than others; for example, a billet in a posting like Hawaii may be highly coveted, while billets in the American Midwest are less appreciated. In this context, a billet is simply a place or position, and some cases the term may be used specifically to positions which can only be filled by one person, such as the captain of a ship.