You are talking about Solfege. Solfege is a music education method used to teach pitch and sight singing of western music that matches syllables with pitches on a music scale. You can learn the different pitches on a music scale on the piano by playing each of the 8 white piano keys that start from the white note middle C and go to the right, and is called C major scale.
Middle C is in the middle of the piano keyboard. You can try humming the syllable Do when you play the white note C.
You can try humming the syllables Do, Re, Mi, Fa, Sol, La, Ti, and Do again to the white notes C, D , E, F, G, A, B, and C ,
and you have played 8 notes, or an octave, from middle C to C. The 8 notes, C, D, E, F, G, A, B, and C make up the C major scale. The C at the top of the scale is the same note C at an octave higher pitch.
Middle C is the white key in the middle of the piano to the left of 2 black keys that are grouped together on the piano and you sing to the syllable Do. You go up to the right on the white keys to play the notes C, D, E, F, G, A, B, and C. Then you try to sing the syllable that represents the letter at the same pitch or sound that is played when you play the note.
C is Do. The next white key to the right is D, or Re. The next white key is E, or Mi. The next white key is F, or Fa.
The next white key is G, or Sol. The next white key is A, or La. The next white key is B, or Ti.
The next white key is C an octave higher, or Do, and you have played 8 notes, or an octave.
You can practice solfege by singing Do, Re, Mi, Fa, Sol, La, Ti, Do in ascending order
and Do, Ti, La, Sol, Fa, Mi, Re, Do in descending order.
Sing the syllables for the notes and you have learned how to sing pitches and notes on a music scale.
You can sing the song "Do-Re-Mi" from The Sound of Music for another way to practice this.
I suggest that you learn how to read notes on sheet music too. Go to Easypianotips.com