The guard spotted Marty McFly watching the documentary on the video monitor at the entrance, and started talking into his personal radio — no doubt tipping off Skinhead, Match and 3-D, who were working as Biff's bodyguard in this ABC timeline, as to Marty's presence and whereabouts.
It remains unclear as to whether the man was still living in Hill Valley in 1985 (after the timeline was restored) and in 2015.
Behind the scenes
In the novelization by Craig Shaw Gardner, it is not a security guard who alerts Skinhead, Match and 3-D but the woman in the museum's ticket booth. Although Marty sees her and wonders if he knows her from somewhere, her identity is never revealed and she is never referred to in the narrative again:
" Marty glanced over at the woman in the ticket booth. She was staring at him. Did he know her from somewhere? She picked up the phone and started talking into it. / Marty turned back to the video monitor. "