Guard
From Dwarf Fortress Wiki
A guard is a dwarf who is serving in either the fortress guard or royal guard. In Fortress Mode you may occasionally see an invader with this profession as well.
Guards in Adventure Mode are fairly common in most towns and cities. They are equipped with a variety of weapons and armour, the quality of which varies with the wealth of the town/city they are defending. Guards will intercept dangerous animals, enemies of their group/civilisation and thieves, all with deadly force. It is not known whether the traditional 'Stop right there criminal scum' warning is given, but either way, guards in the current version of dwarf fortress are only interested in killing their intended target.
Because Guards in Adventure mode are busy with their duties, they will not join your adventuring party.
If you embark on a settlement with Guards in Fortress mode, they will stay, providing your budding fortress/castle/whatever with a ready made defense force, albeit one which is beyond direct control.
