All the strings on the piano are always damped. This means that a piece of felt is resting on the string all the time that the key is not depressed. These strings will not vibrate and will not make any sound unless the key is depressed. When we press the sustain pedal (the one on the right) all the dampers lift up and the piano comes to life!
The piano sounds so much better when the pedal is down. All the strings are free to vibrate. So why don’t we leave it down all the time? The reason is that all the notes would mush together and it would sound like chaos.
So the piano sounds bad with the pedal not depressed, and the piano sounds bad with the pedal down. So what are we to do? The answer is we need to learn how to repeatedly press and lift the sustain pedal.
The first thing is that your heel must be on the floor. If not you will have no control. Make sure your seat is in a position where you can keep your right heel on the floor in front of the sustain pedal, and that you are in a comfortable position to play the piano. Then you can start to use the pedal. Initially you should only use it when the piece of music you are playing tells you to. Later you can add it in when you think it will sound good.
The secret is to listen really carefully. As soon as the music become detached and spiky sounding you need to use it more. As soon as the music becomes mushy and too dense you need to lighten up your foot. This will take some getting used to, but soon you will be adding pedal to your pieces really naturally, and they will sound so much better.