What it means
Calling someone a legend is big warm praise for a mate who's just been absolutely top drawer. It's what you say when someone comes through, does you a solid, sorts the round, or saves your bacon without making a fuss. You absolute legend is the full-strength version.
Usage examples
"You brought snacks for everyone? Absolute legend."
"Thanks for covering my shift, you legend."
"You dropped me at the station at six in the morning? Legend."
"She brought chips for the whole table, what a legend."
Where it comes from
It comes straight from legend in the older sense of a famous heroic figure or larger-than-life person. In everyday English it got playfully shrunk down and turned into praise for regular people doing something brilliant, generous, or just wonderfully sound.