The quartering act required colonists to provide housing for soldiers when necessary. The quartering act had been first enacted during the French and Indian war, at a time when it was deemed necessary, and many colonists were fighting the French themselves anyway, so no grievances were had with it at that time. Once the war ended, British soldiers had no reason to lodge anywhere besides their designated barracks, which were commonplace all throughout Europe and perfectly reasonable establishments. Barracks weren't as expensive as forts to maintain, and they were generally kept out of the way of civilian populations, so they were deemed acceptable. However, in 1765 a new quartering act was passed. The colonies had been at peace for some time now, and the reason for these acts was simply because the crown could not afford to quarter them elsewhere. These acts were illegal under the English bill of rights passed in 1689, which also applied to the colonies.
The colonists refused to comply with this law, and following the Boston tea party, a new quartering law was passed in 1774. This law was aimed at quelling radical sentiment in the colonies, and amended the previous one by stating that colonists now did not have to provide food, goods, and equipment to British soldiers, and that soldiers could now only lodge in colonial establishments with the consent of both parties involved. This would have been well and good, if British soldiers had complied. Many soldiers completely disregarded the law, and continued to quarter in colonial inns, shops, and homes without consent, and often looted establishments that they stayed at. This, among other things led to the colonists writing up a list of "Intolerable Acts", which included several other acts that most people are familiar with.