There are two bus routes that serve Lerici from La Spezia, the L or S. There is no difference except that one ends in Lerici and the other continues on to Sarzana. The busses run about every 15 minutes during the day and stop just before midnight. The trip is less than 30 minutes.
Tickets are available from vending machines, tabaccaio shops, and at the tourist office at the train station in La Spezia.
Tickets cost around 2 euros each, a bit cheaper if you buy a book of 10.
Tickets must be validated by punching them in the little yellow machines on the bus. On almost every trip to Lerici, I have seen the police check tickets and there is always a scofflaw who gets cited (why they risk it I have no idea).