It is advisable to buy the ticket before getting on the bus since not all the buses are provided with automatic ticket machines in Italy.
Children under four can travel free of charge in both first and second class, but they are not entitled to any seat. Instead, young people until the age of twelve (age is considered completed on the day following the anniversary of birth), can occupy a seat and they can travel with a 50% or 30% reduction for VL and CC services (sleeping carriages and berths).
Source: Trenitalia (available in Italian only)