The volume of a piano is changed by how hard the keys are pressed. The harder a key is pressed, the louder the note will be. The volume can also be changed by using the pedals. The sustain pedal, for example, prolongs the sound of the notes after the keys are released.
Additionally, the pitch and volume of a piano can be slightly altered by adjusting the tuning pins. This is a delicate process and should be done by a qualified piano tuner.