Technically, the piano is a percussion instrument, and it generates noise when the keys are depressed because each key is connected to a small hammer that strikes a string that is located inside the instrument. Pianos with broken keys, hammers or strings will not generate sound correctly and may not even generate any sound at all other than the sound of the key being struck. Piano players use their fingers and hands to depress the keys, which then triggers the string striking that generates musical notes that coordinate to the specific key being pressed.
The instrument known as a piano is actually formally called a pianoforte, and it is one of several keyboard-based instruments that generates sound through the depression of keys that trigger a hammer to strike a string. Other instruments in this category include harpsichords, organs and celestas.
Modern pianos tend to have 88 total keys, with 52 white and 36 black keys representing a range of musical notes that make up a total of seven octaves. Piano players will press multiple keys at a time with each hand in order to form chords.
In addition to keys, pianos include pedals. These pedals alter rather than generate sound. The piano player may depress a pedal in order to soften or sustain a note.