The popcorn effect occurs during soldering, when moisture absorbed by plastic-packaged parts turns to steam, building up pressure inside the component and causing the package to crack. The problem usually only occurs during reflow soldering, because of the high temperatures to which the part is exposed, and is seen most frequently with large, thin components, such as BGAs. Parts vary widely in their sensitivity to moisture, and sensitive parts should be supplied in sealed, dry containers, suitably marked.
The problem can be prevented by buying parts which have been manufactured and stored in a dry environment, and using them almost immediately they are unpacked from their sealed bags. The humidity indicator strip should always be checked, to ensure that the parts being assembled are dry! If in doubt, parts should be carefully re-baked (long periods at relative low temperatures) before use.