A garrison most often refers to a military outpost where troops are stationed to provide protection to an area. The word garrison is also used to refer to the troops stationed there.
Garrison is from the Old French verb garir, meaning "defend, protect" is of Germanic origin, so you can see where the noun garrison gets its sense of a stronghold of defense. A great example is Hadrian's Wall, completed in 128 A.D. by the Roman emperor Hadrian. The wall was built across Scotland to protect settlements to the south from invaders, and it was dotted with around two dozen forts that could each hold a garrison of 500 soldiers.