Useful maps of St. Andrews and its location can be found here. The university's travel guidelines are here.
By Train:
By Air:
By Bus:
By Taxi (ex Edinburgh / Edinburgh Airport):
By Road (self-drive):