A guard is an individual assigned to watch over someone or something, or to protect someone.
Following the massacre on Tarsus IV Governor Gisela Ribeiro's former aide attempted to assassinate her with a grenade. This led the Starfleet team to believe there were still Security Force guards loyal to former Governor Kodos amongst the guards assigned to protect the Governor and her staff. They limited the individuals guarding prisoners such as Alexander Simmons to people they could absolutely trust, and supplemented them with security personnel from the USS Narbonne. (DSC novel: Drastic Measures)
After expressing an opinion about Wesley Crusher on the bridge of the USS Enterprise, Boyajian was transferred over to security by Captain Jean-Luc Picard. One of his first assignments in security was to guard the ship's armoury while the Kreel and Klingon delegations were on board. He was manipulated into leaving the armoury unguarded by the Selelvian Jaan Devin, allowing the Kreel to break in and steal several hand phasers. (TNG novel: Strike Zone)