On the piano
The keyboard shows the same three notes as a shape you can see. The coloured keys are the C major arpeggio, the pale keys are the rest of C major, and you can click any key to hear it.
On the staff
On a treble staff, C is written C, E and G.
The staff shows the notes one after the other, then together. Written this way the chord is in close position, which means each note sits as near to the one below it as the spelling allows. A guitar almost never plays a chord in close position.
C under a hand
Strummed from the lowest string to the highest, this grip sounds C, G, C and E, which are the degrees 1 5 1 3 rather than the 1 3 5 of the written chord. The root is the lowest note, so this grip is in root position and sounds the way the written chord suggests. With C in the bass and four strings sounding three notes, the 1 appears more than once.
Strummed from the lowest string to the highest, this grip sounds E, C, E and G, which are the degrees 3 1 3 5 rather than the 1 3 5 of the written chord. The lowest note is the 3 rather than the root, so this grip is in first inversion, written C/E. It has the same notes as the root-position grip, but with E in the bass it sounds different. With E in the bass and four strings sounding three notes, the 3 appears more than once.
Strummed from the lowest string to the highest, this grip sounds G, C and E, which are the degrees 5 1 3 rather than the 1 3 5 of the written chord. The lowest note is the 5 rather than the root, so this grip is in second inversion, written C/G. It has the same notes as the root-position grip, but with G in the bass it sounds different.
Three shapes for C on ukulele: C, C/E and C/G.
Every grip here is C, but no two of them sound alike. A chord with the root as its lowest note is in root position, and a chord with any other note at the bottom is an inversion. On a keyboard you choose the inversion you want, but on a neck the shape your hand can reach usually decides it for you. When a grip sounds a note more than once, the fretting hand decides which note that is, not the harmony.
A major chord has three notes: the root, the note four semitones above it and the note seven semitones above it. With four strings and only three notes, one of the notes has to sound twice, which is called doubling. Which note you double is most of what a ukulele grip decides.
That is why a ukulele has several usable shapes for one chord. An instrument with exactly as many strings as chord tones would allow fewer arrangements. On a ukulele the shapes differ in which note is lowest and which note is doubled.
The keyboard shows the three notes as three keys, and the staff shows them stacked. The grips below show how your hand arranges them on the strings.