Someone correct me if I am wrong but I believe they speed up the rate at which the ship that would use those parts is built.
I would need to check to see if this would cover refits to a new ship class (modernization) but IIRC it does. The parts in your stockpile are reduced by whatever can go on a ship. The ship is then considered to be that far along on the building of it and the remainder of the time needs to be put in by a shipyard. A good example would be a military beam weapons escort. I built the engines, weapons, fire controls, sensors, and power plant and put them in my stockpile. When I started to build the ship it took all of those parts and added them to the ship under construction. Said ship was now almost 80% complete so the remaining 20% was all it needed to actually build. In this case the original build time was 20 months. It actually took 4 months to build. I have managed with a lot of prebuilding parts to make a 30,000 ton energy combatant in just 3 months when it would normally have taken almost 30 months.
Hope this helps
Brian