Gradual changes in volume are indicated by the crescendo (meaning a gradual increase in volume) and the diminuendo (meaning a gradual decrease in volume).
Learning to use dynamics effectively takes quite a while. A good way to practice them is to play a basic rhythm (e.g two bars of eighth notes) on one note, but at different dynamic levels, ranging from as softly as you can play to as loudly as you can play. Then try the same thing with a short melody. These two extremes are not so difficult, although keeping all the notes consistent when playing very quietly can be tricky at first. Most beginners have trouble making the grades of volume in between pp and f distinguishable, so be patient and keep practicing until you are comfortable with all the dynamic levels shown above.
Once you are comfortable with different dynamic levels, start adding crescendos and diminuendos. Again, start with one note until you are comfortable with gradual and consistent volume changes, then try crescendos and diminuendos with scales and finally with melodies. An instrumentalist with good control of dynamics and time will always be in demand with other musicians and well appreciated by audiences.