In my experience, you can think of a marathon as a collection of sprints which share a theme from a section of your backlog. You could also think of marathons as quarters of a year. Q1, Q2... etc
For example, imagine you have a product vision as:
Then on your roadmap you have the themes (or marathons) which deliver your vision:
- Build a family house
- Get off the ground
- Build Garage
- Build Kitchen
Then your first sprint might look like:
- Build a family house
- Get off the ground
- Aquire some land
- Design footprint
- Apply for planning permission
- Source builders
- Build Garage
- Build Kitchen
How are marathons executed e.g. timelines?
As WBW said, they are still executed using sprints, so the marathon timeline is usually simply a multiple of your sprint length, and its completion or success is defined by the goals of the marathon.
In our example above you can think of the themes as marathons. The "Build Garage" marathon goals would be something like:
- I have a structure I can fit a car inside
- The car is protected from the weather
So you would plan your sprints around achieving these goals and the estimated marathon length is however many sprints its estimated to complete these goals.