A guard is an individual who is assigned to watch over or protect something. On the Federation planet of Ardana, the term sentinel was used to describe the guards found in the cloud city of Stratos. On Starfleet starships, this task is usually given to a security officer, often one with a lower title than security chief.
The Malcorian Lanel once helped William T. Riker escape by distracting the guard outside the room where Riker was being held. Before she helped him, however, she made him fulfill one of her fantasies: having sex with an alien. (TNG: "First Contact")
A guard was assigned to protect the quarters of Gul Dukat while he was aboard Deep Space 9 in 2370 assisting Benjamin Sisko with an investigation into weapons smuggling. He was able to provide a description of two individuals who assaulted him in the process of abducting Dukat from the station. Those individuals were later identified as members of the Maquis. (DS9: "The Maquis, Part I")
Two Jem'Hadar guards were posted in the station's brig while Kira Nerys and Rom were being held there, the latter scheduled for execution the next day. However, Quark and Tora Ziyal disabled the officer stationed in the security office and Quark shot both guards. (DS9: "Sacrifice of Angels")