In the story, the King sends you on a quest to get more toy Pokémon to outshine a local Magician who has better Pokémon and insists that he should be king instead. During the play of the game, you will receive special missions from the King that were said to be given by the Magician. These special challenges won't allow you to collect any Pokémon within them, but will rather challenge you to get to the end.
When you start the challenge, you will get given multiple challenge constraints, each with a special amount of PokéDiamonds given if you achieve them. You get 5 PokéDiamonds for beating the challenge as a whole, and 2 for each additional constraint. You can redo any challenge at any time.
As you rank up through your Adventure Rank by showing the king lots of new species of Pokémon, he will provide more challenges every 2 to 3 levels. These challenges come in many varieties and help further the story of the king defending his kingdom. These challenges are mostly just requiring you to defeat opponents to the kingdom, who are often teamed with Mega Evolutions, but also provide Battle Royales and Escort Missions. These challenges are the same as the daily ones, but can bypass the daily wait when you reach a certain rank.
These challenges are necessary to unlock various features including the Mega Evolution Set and the Move Tutor house.
After you have competed the challenge, you can do it again in Hard Mode. This removes the timer and makes the opponents stronger and gives you an additional 2 Poké Diamonds for completion.