To walk on the Sentiero Azzurro you need a pass : the Cinque Terre Card.
You don't have to buy it beforehand. At the beginning of each of the sections, you will find checkpoints where the card is for sale. Nobody there ? Just continue your walk !
A pass for one day costs 7.5 EUR for adults (reductions for children and families) and also provides free access to the Park-busses (which e.g. take you from the station of Corniglia to the center of the town, saving 382 stairs) and to some local musea.
With the Cinque Terre Train Card, you can walk the Sentiero Azzurro and you also have unlimited access on the local trains (including the Cinque Terre Express) between La Spezia and Levanto. This card costs 16 EUR for 1 day and 29 EUR for 2 days.
Some additional benefits of the Cinque Terre Train Card :