Your Pikmin posse will bring objects that you find – like nutritious fruit – back to your spaceship for processing, and you’ll hide in here at night when the planet becomes far too dangerous to explore.
The Onion is a bit like the Pikmin spaceship – since all the different types of Pikmin hide inside it at nightfall too – but it also helps to make new Pikmin! Feed tasty things to it (like Pellets or downed enemies) and out will come a stream of Pikmin seeds that'll plant in the ground, turning into Pikmin Sprouts. The more valuable something is, the more Pikmin Sprouts you'll get for it. Uproot a Pikmin and it’ll become part of your squad!
Exploration Note
The Pikmin seeds that come from the Onion usually match the colour of Pikmin that carried the object back.