The French rail system (SNCF) is extensive and very efficient. We often use it to get from Paris to the beginning of our walk and back again at the end.
Booking in advance gives you the option of buying a “prem” ticket. Prems are much cheaper, but non-exchangeable and non-refundable. They can be purchased from 3 months before travel until 8 days before, but there are only a limited number available on each train, so book early.
The TGV (high-speed train) network is more expensive than normal trains (TER), but saves time and is quite an experience.
The easiest way to book tickets is through the SNCF website, where you can buy your tickets and print them out at home. That way you can step straight on to the train without queuing up at the ticket counter.
If you do not have access to a printer, you can pick up your booked tickets at the railway station, but you must show the credit card that you used to buy the tickets, to validate your identity.
An oddity of the French rail system is that tickets (not ones that you print out yourself) must be “composted” before boarding the train.
This means getting them punched in a little yellow machine at the entrance of the platform.
Tickets are always checked by a conductor on the train and if they are not composted, you will be frowned on, or even fined.