To prevent ham from drying out, cover it tightly with aluminum foil or place it in an airtight container. This helps retain moisture and preserves its flavor. Additionally, storing it in the coldest part of the fridge, such as the back or bottom shelf, can help maintain freshness.