Upvote:10
The confusion is due to the difference between the Links — the sandy, grassy areas unsuitable for crops or buildings near the coast — and the course — the actual arrangement of tees, holes and traps.
While the Links at St. Andrews has been home to golf for longer, the actual course is newer — in the early 19th Century, the Links had to accommodate rabbit farmers as well as golfers!
The course at Musselburgh Links has been in continuous operation for longer, and they have documented evidence of it.