The story follows students from Països Catalans who encounter prehistoric characters after discovering a time machine during an adventure at 'la mitjana.' They befriend the prehistoric people and help a pirate find his lost parrot, leading to a communal effort to clean up and repair the time machine for the prehistoric characters to return home. Ultimately, the students return to school to share their incredible experiences with their families.