Stockpiles are where dwarves store items of various types, usually in a safer, closer or more convenient place for the consumers. Dwarves with the corresponding "hauling" labor enabled on will seek out items that aren't already on a stockpile that accepts them and carry them to an appropriate stockpile, if available. Items in a stockpile may be stored in containers such as bags, barrels or bins. Seed bags, flour bags, and dye bags can go inside barrels. Empty bags, however, cannot be stacked.
After creating a stockpile you need to configure it to enable the item categories you want it to store. Also, to enable bins and barrels to be used to hold stuff, you need to increase maximum allowed number of corresponding containers for that stockpile, which all initially set to zero.