The nearest National Rail station is at Wareham. The service is operated by South West Trains with regular trains from London and Weymouth. Details of the timetable and fares can be found on their website https://www.southwesternrailway.com. The Purbeck Breezer bus number 40 runs from Poole to Swanage and connects with the railway at both Wareham and Poole.
From Bournemouth railway station there is a regular bus service, the award winning open top Purbeck Breezer number 50 which travels to the centre of Swanage via the chain ferry at Sandbanks.
You can view the latest bus timetables on the morebus website.
If you are travelling by car to Swanage, then you may like to take advantage of the car park at Norden (just outside Corfe Castle) and travel into Swanage on the heritage steam train. Please check their web site https://www.swanagerailway.co.uk for details of the train timetable and fares.
Swanage is also served by National Express from Victoria Coach Station in London. Please note that there is only one coach each day that arrives in Swanage in the evening and leaving for London in the morning. Please check the National Express website for more information.