If you are driving from Edinburgh, take the A90/A92 towards Dundee, then follow signs for St Andrews. The journey should take around 1 hour 15 minutes.
If you are coming by train, the nearest station to St Andrews is Leuchars, which is on the mainline from Edinburgh to Dundee. From Leuchars, you can take a bus or taxi to St Andrews (about 10 minutes).
If you're coming from Glasgow, take the M80 towards Stirling, then follow the M9 towards Perth. From Perth, take the A91 towards Cupar, then follow signs for St Andrews. This journey should take around 2 hours.
If you're already in Fife, you can take a bus from towns such as Glenrothes or Cupar, or even walk or cycle along the Fife Coastal Path.
Whichever method of transport you choose, be sure to take in the beautiful coastal scenery and historic landmarks along the way.