Lums are kind of a currency in Rayman Legends, and you can collect Lums in order to unlock new playable characters. These does not really have any better stats or anything like that, and it's just for personal preference when playing, but it's fun to work towards unlocking all the characters.
If you want to unlock every single character, then you will need a total of 1,000,000 / one millions Lums, which will take a long time to get. Even players who have 100 %'ed the game still haven't always gotten the 1,000,000 Lum unlockable character when they complete it.
Grinding out the Lums you miss will mostly be tied to doing Online Challenges. There are two ways to do this;
1) Just do all the Daily and Weekly challenges.
Try to always aim for getting a Gold or Diamond trophy for both Daily challenges every day, and the same for the weekly challenges every week. Every time these resets, you get a huge chunk of Lums, and you typically get to a million after doing this every day for three to four weeks, depending on how many Lums you already have.
2) Find challenges that give you a lot of Lums and grind it out.
Somme of the Online Challenges give a very decent amount of Lums per run, and a 5 minute run can give you 500-1,000 Lums. The problem is that these challenges changes daily and weekly, so we can't really recommend any special runs over others. So just play it every once in a while, and you will surely notice it when you get a nice amount of Lums per run. When you find this, just grind it for as long as you can, and hopefully you will have time to grind it out before the challenge changes again.