The guard are trained to fight in the same fashion as line infantry, standing in line to deliver volley fire from their smoothbore muskets. They are, however, considered to be elite, as they are chosen for their devotion to the national cause and for their personal courage. In a republic all men may be equal, but the guard are more equal than other soldiers!
In much the same way as a royal or household guard would do in a monarchy, this force also has a ceremonial role, giving protection to the head of state. Their presence at formal occasions adds gravitas to the business of the republic. A republican guard is different from a royal guard in one other respect: it can include political officers in its ranks, whose main job is to watch for signs of disloyalty.
Historically, the “palace guard” sometimes became the only unit a leader could rely on when politics got out of hand, most of the time. It was not unknown for the guard to take the role of “kingmakers”, even in a republic, and only give their protection to a presidential candidate of whom they approved.