Hello Kellie this is a very good question.
Electrolytic capacitors have an oil in them that settles to 1 side when left on a shelf or in some type of assembly for more than a year without use. Keep in mind it is only the large electrolytics that will need this done.
Very simple Kellie, you just put them under power for about an hour or so. If the parts are loose (not mounted in anything) then check the voltage rating and work them up to their rated value slowly, like 30 minutes at 50% and another 30 minutes at full rated voltage, and 2 hours is not to long if they have been sitting around over 2 years.