You need to breed it with either Gulpin, Swalot, Drifloon or Drifblim that knows Stockpile.
They learn Stockpile at the following levels:
Gulpin - 39
Swalot - 45
Drifloon - 25
Drifblim - 25
So the qickest way would be to catch a Drifloon and level it up. In Pokemon X and Y you can find them on route 8, at levels 13 - 15.
Hope I helped!