On a grand piano the soft pedal shifts the action to one side slightly, so that hammers that normally strike all three of the strings for a note strike only two of them. This softens the note and also modifies its tone quality.
On upright pianos this is replaced by a mechanism for moving the hammers resting position closer to the strings. This reduces volume but does not change tone quality.
The soft pedal was invented by Cristofori and thus appeared on the very earliest pianos. In the 18th and early 19th centuries, the soft pedal was more effective than today, since it was possible at that time to use it to strike three, two or even just one string per note—this is the origin of the name "una corda", Italian for "one string". In modern pianos, the strings are spaced too closely to permit a true "una corda" effect—if shifted far enough to strike just one string on one note, the hammers would also strike the string of the next note over.
Actually, my upright piano doesnt have an una corda pedal. I have a sustain pedal and a practice pedal (is that what its called?) which drops a strip of felt between the hammers and the strings so that all the notes are muted.
Wonder why that is...