Lets suppose we want to construct an A major chord.
Major chords have the formula 1 - 3 - 5. By comparing the models below you can see Note 1 = A (the root), Note 3 = C# (or Db), Note 3 = E
So the major Triad chord of A major has the notes A - C# - E .
This doesn't mean you only play just those 3 notes on the guitar because a guitar has six strings. It means you only play those 3 notes over the 4 to 6 strings so you may be playing a note twice (although an octave higher) to make the chord.
NOTE: The chord formulas are simply used for working out the notes in the chord. When a chord is actually played those notes can be in different orders, not in the order worked out in the formula.