What major chords are
A major chord is a triad built from a root, major third, and perfect fifth. In C major, that is C, E, and G.
On piano, that formula becomes visible. The spacing between white and black keys changes from key to key, but the sound of the major triad stays the same.