What do the pedals on a piano do?
The right pedal is the sustain pedal and holds notes that are played even after you let go of the key. This lets you connect notes and lets you play more notes than you could hold with your fingers.
The left pedal is the soft pedal. On a vertical piano, it moves the hammers closer to the string so the blow distance is less which lets you play more softly. On a grand piano, the left pedal shifts the whole keyboard and action to the hammers miss one of the strings. This makes the sound softer and changes the attack of the sound.
The middle pedal on a large grand piano is the sustenuto pedal which holds any notes that are being played when the pedal is pressed and not others that are played afterwards. This can be used for organ music where a bass note is played and held with the sustenuto while other notes are played above it. On many vertical pianos, the middle pedal holds the notes in the bass section but not in the treble. This is a cheaper version of sustenuto. On the piano in the picture below the middle pedal activates a muffler rail which puts a strip of felt between the hammers and the strings. This makes the sound very soft so the piano can be played without bothering others. In this picture you can also see the dampers that sit against the strings to stop their sound. The damper lifts off the string when the key is played or the sustain pedal is pressed.
On a vertical piano there is a bolt and nut that adjust the linkage between the pedal and the rod that activates the dampers. The pedal should have a small amount of ”lost motion” so the dampers don’t start to move immediately. This lets you rest you foot gently on the pedal without raising the dampers.