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 dynamics 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 A and G 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.
Another aspect of dynamics is the use of Accents. Accent marks are used to indicate notes which are to be played louder than other notes. The accent is indicated by a horizontal wedge mark above or below the note as shown below.
Listen to the recording to hear the effect produced by accenting some of the notes. A good way to gain control of the use of accents is to practice two bars of 8th notes, accenting all notes on the beat and then reversing the process (accenting all notes off the beat).