Maybe the follow-up question should be "How NOT to store hay". LOL
Small squares: Stored under shed, gravel floor, put 6 mil plastic down as vapor barrier and then stack hay on plastic pallets.
I'll never use wooden pallets again. Wood acts as a wick for moisture, especially if in direct contact with ground.
If you tarp hay, be careful not to create a "moisture trap". Need to create a space to allow for air flow.